Sometimes make error at some devices
I refer similar code in stackoverflow, and it worked very well on my device(HTC raidar 4G, Nexus 7, Galaxy)
But If I use other phone(other htc phone, motorola atrix) it crashed. I track code and find that devices have different view.
http://stackoverflow.com/questions/11650847/decorview-child-framelayout <- This issue has similar problem with me.
That thread said that remove NoTitleBar attribute, but it doesn't work to me.
So I asked here : http://stackoverflow.com/questions/12109512/decorview-child-framelayout-is-different-at-devices
and one said that do not use android.R.id.content since it is different with devices. Have you any idea about this? Thanks,
Could you provide a stack trace of the crash? We heard from at least one user with a similar problem...
I do experience similar problems with a basic app, that works on Nexus S (Android 4.1.1), but crashes on others (Samsung Galaxy S and Huawei Ideos X3, both 2.3). The app is designed to work with API version 9. Above stackoverflow threads don't give me a clue. Has anyone made similar experience?
My stack trace would be: 08-27 10:56:18.330: D/AndroidRuntime(1276): Shutting down VM 08-27 10:56:18.330: W/dalvikvm(1276): threadid=1: thread exiting with uncaught exception (group=0x40020560) 08-27 10:56:18.340: E/AndroidRuntime(1276): FATAL EXCEPTION: main 08-27 10:56:18.340: E/AndroidRuntime(1276): java.lang.ClassCastException: com.android.internal.policy.impl.PhoneWindow$DecorView 08-27 10:56:18.340: E/AndroidRuntime(1276): at com.coboltforge.slidemenu.SlideMenu.show(SlideMenu.java:245) 08-27 10:56:18.340: E/AndroidRuntime(1276): at com.coboltforge.slidemenu.SlideMenu.show(SlideMenu.java:237) 08-27 10:56:18.340: E/AndroidRuntime(1276): at com.example.googlemaps.MainActivity$1.onClick(MainActivity.java:54) 08-27 10:56:18.340: E/AndroidRuntime(1276): at android.view.View.performClick(View.java:2485) 08-27 10:56:18.340: E/AndroidRuntime(1276): at android.view.View$PerformClick.run(View.java:9080) 08-27 10:56:18.340: E/AndroidRuntime(1276): at android.os.Handler.handleCallback(Handler.java:587) 08-27 10:56:18.340: E/AndroidRuntime(1276): at android.os.Handler.dispatchMessage(Handler.java:92) 08-27 10:56:18.340: E/AndroidRuntime(1276): at android.os.Looper.loop(Looper.java:123) 08-27 10:56:18.340: E/AndroidRuntime(1276): at android.app.ActivityThread.main(ActivityThread.java:3695) 08-27 10:56:18.340: E/AndroidRuntime(1276): at java.lang.reflect.Method.invokeNative(Native Method) 08-27 10:56:18.340: E/AndroidRuntime(1276): at java.lang.reflect.Method.invoke(Method.java:507) 08-27 10:56:18.340: E/AndroidRuntime(1276): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842) 08-27 10:56:18.340: E/AndroidRuntime(1276): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 08-27 10:56:18.340: E/AndroidRuntime(1276): at dalvik.system.NativeStart.main(Native Method) 08-27 10:56:20.980: I/Process(1276): Sending signal. PID: 1276 SIG: 9
Thanks
@stefanreimers do you use a support action bar?
We had one user reporting a similar problem --> http://www.coboltforge.com/2012/07/tech-stuff-a-sliding-menu-for-android-very-much-like-the-google-and-facebook-apps-have-it/#comment-27
I emptied my layout xml to verify there is no problem in that --> issue remains anyway, even with the layout.xml of your example project. But it turns out that
android:theme="@android:style/Theme.NoTitleBar"
within the activity tag of the manifest file is the problem. As soon as I remove this attribute, sliding works fine. But displaying the title bar is not the intended solution.
That is, it fails with android:theme="@android:style/Theme.NoTitleBar" applied to the example project?
Yes, the example project crashes when adding the NoTitleBar attribute to the manifest. Did Darren - who posted the comment about a possible solution on your website - supply any patch for that?
Nope, but at least we can reproduce it now and find a fix...
Hi Guys,
I didn't add NoTitleBar attribute, but still have a problem. So I changed a code as possible as I can, but it have limitation in some devices.
Here is related thread: http://stackoverflow.com/questions/12109512/decorview-child-framelayout-is-different-at-devices
I apply his comment and doesn't use android.R.id.content in here. Still works well in some devices,
but still have a little problem when using show() method in devices that have a problem before.
2012/8/28 Christian Beier [email protected]
Nope, but at least we can reproduce it now and find a fix...
— Reply to this email directly or view it on GitHubhttps://github.com/bk138/LibSlideMenu/issues/5#issuecomment-8058378.
Best regards, Seongeun So
Guys, what about https://github.com/bk138/LibSlideMenu/commit/9b9ae22c8e463559324e377f6e89a430dd4fd7ca ?
Works for me, thanks a lot!
Hi Guys,
It can catch crash, but still have a problem in my atrix.
There's no crash, but the problem is, slide menu cover original view.
If it run as normal, then original view move to right side, and devide screen with slide menu, but in my atrix, slide menu covered original view so it is not good to see. (But, hide() method works well.)
I've tried to fix to a lot, but still have no progress. (My atrix is not custom rom. it's 2.3 version pure rom from motorola)
2012/8/28 stefanreimers [email protected]
Works for me, thanks a lot!
— Reply to this email directly or view it on GitHubhttps://github.com/bk138/LibSlideMenu/issues/5#issuecomment-8063810.
Best regards, Seongeun So
Can you please post a screenshot of the hierarchyviewer inspecting the atrix?
Attahed file is screen shot from atrix. Slide menu cover original view.
I've already tried to use hierarchyviewer but doesn't work. It cause error.
2012/8/28 Christian Beier [email protected]
Can you please post a screenshot of the hierarchyviewer inspecting the atrix?
— Reply to this email directly or view it on GitHubhttps://github.com/bk138/LibSlideMenu/issues/5#issuecomment-8094290.
Best regards, Seongeun So
You'll have to upload the image and post a link. Hierarchy viewer only works in debug mode, not normal run mode....
I heard that hierarchy viewer only run on emulator.
Is it work on real device? I searched about that but there's no solution
2012/8/29 Christian Beier [email protected]
You'll have to upload the image and post a link. Hierarchy viewer only works in debug mode, not normal run mode....
— Reply to this email directly or view it on GitHubhttps://github.com/bk138/LibSlideMenu/issues/5#issuecomment-8095612.
Best regards, Seongeun So
I use this: http://enadroid.blogspot.kr/2011/08/hierarchyviewer-unable-to-debug-device.html
hierarchy viewer works if use that post.
Here is my link: http://www.flickr.com/photos/86018774@N07/7881131362/
2012/8/29 Seongeun So [email protected]
I heard that hierarchy viewer only run on emulator.
Is it work on real device? I searched about that but there's no solution
2012/8/29 Christian Beier [email protected]
You'll have to upload the image and post a link. Hierarchy viewer only works in debug mode, not normal run mode....
— Reply to this email directly or view it on GitHubhttps://github.com/bk138/LibSlideMenu/issues/5#issuecomment-8095612.
Best regards, Seongeun So
Best regards, Seongeun So
Hmm, I suspect that the tabhost could be the culprit. Have you tried the included minimal sample app on your Atrix? (Maybe TabHost is not animatable??)
I delete TabHost, and tried again.
This is hierarchy view: http://www.flickr.com/photos/86018774@N07/7884675224/
Still have a same problem,
2012/8/29 Christian Beier [email protected]
Hmm, I suspect that the tabhost could be the culprit. Have you tried the included minimal sample app on your Atrix? (Maybe TabHost is not animatable??)
— Reply to this email directly or view it on GitHubhttps://github.com/bk138/LibSlideMenu/issues/5#issuecomment-8101726.
Best regards, Seongeun So
Now there is another child to the phone decor view - what is it?
It works fine for android 2.3 to 4.2 . but when i tried it by installing it in 4.3 latest version of android , the slide menu get crash . I'm not getting what's the reason ??
Error Log : http://stackoverflow.com/questions/17874416/sliding-menu-is-not-working-in-android-4-3-version
See this report here https://github.com/bk138/LibSlideMenu/issues/18#issuecomment-21571514