bk138 / LibSlideMenu

A sliding menu for Android, as found in the Google+ or Facebook apps.
Apache License 2.0
99 stars 56 forks source link

ClassCastException #18

Closed ghost closed 11 years ago

ghost commented 11 years ago

Getting a ClassCastException on Android 4.3 Devices:

07-25 12:13:31.898: E/AndroidRuntime(31613): FATAL EXCEPTION: main 07-25 12:13:31.898: E/AndroidRuntime(31613): java.lang.ClassCastException: com.android.internal.widget.ActionBarOverlayLayout cannot be cast to android.widget.FrameLayout 07-25 12:13:31.898: E/AndroidRuntime(31613): at com.coboltforge.slidemenu.SlideMenu.show(SlideMenu.java:317) 07-25 12:13:31.898: E/AndroidRuntime(31613): at com.coboltforge.slidemenu.SlideMenu.show(SlideMenu.java:260) 07-25 12:13:31.898: E/AndroidRuntime(31613): at com.securenetsystems.g5.MainActivity$5.onClick(MainActivity.java:234) 07-25 12:13:31.898: E/AndroidRuntime(31613): at android.view.View.performClick(View.java:4240) 07-25 12:13:31.898: E/AndroidRuntime(31613): at android.view.View$PerformClick.run(View.java:17721) 07-25 12:13:31.898: E/AndroidRuntime(31613): at android.os.Handler.handleCallback(Handler.java:730) 07-25 12:13:31.898: E/AndroidRuntime(31613): at android.os.Handler.dispatchMessage(Handler.java:92) 07-25 12:13:31.898: E/AndroidRuntime(31613): at android.os.Looper.loop(Looper.java:137) 07-25 12:13:31.898: E/AndroidRuntime(31613): at android.app.ActivityThread.main(ActivityThread.java:5103) 07-25 12:13:31.898: E/AndroidRuntime(31613): at java.lang.reflect.Method.invokeNative(Native Method) 07-25 12:13:31.898: E/AndroidRuntime(31613): at java.lang.reflect.Method.invoke(Method.java:525) 07-25 12:13:31.898: E/AndroidRuntime(31613): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737) 07-25 12:13:31.898: E/AndroidRuntime(31613): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 07-25 12:13:31.898: E/AndroidRuntime(31613): at dalvik.system.NativeStart.main(Native Method)

bk138 commented 11 years ago

hmm - does the latest commit fix this?

ghost commented 11 years ago

I just tested the latest commit and get the same error:

07-25 12:52:03.312: E/AndroidRuntime(32431): FATAL EXCEPTION: main 07-25 12:52:03.312: E/AndroidRuntime(32431): java.lang.ClassCastException: com.android.internal.widget.ActionBarOverlayLayout cannot be cast to android.widget.LinearLayout 07-25 12:52:03.312: E/AndroidRuntime(32431): at com.coboltforge.slidemenu.SlideMenu.show(SlideMenu.java:324) 07-25 12:52:03.312: E/AndroidRuntime(32431): at com.coboltforge.slidemenu.SlideMenu.show(SlideMenu.java:260)

bk138 commented 11 years ago

hmkay, what about the last one?

ghost commented 11 years ago

Now I'm getting this:

07-25 13:45:07.952: E/AndroidRuntime(1900): java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to com.android.internal.widget.ActionBarOverlayLayout$LayoutParams 07-25 13:45:07.952: E/AndroidRuntime(1900): at com.android.internal.widget.ActionBarOverlayLayout.applyInsets(ActionBarOverlayLayout.java:147) 07-25 13:45:07.952: E/AndroidRuntime(1900): at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:292)

UdayHarihar commented 11 years ago

Does it have any fix ?

bk138 commented 11 years ago

difficult.working on it. would be nice if someone could pick this up....

bk138 commented 11 years ago

ok https://github.com/bk138/LibSlideMenu/commit/0fe72c09af6db5df07cd07c5f6de3b8fc65e8a1e fixes it. I have not tried fullscreen apps / no actionbar though,might still crash there...

Can you pls test?

UdayHarihar commented 11 years ago

It's working Fine now . Tested on 2.3 & 4.3 version . ThankQ .

ghost commented 11 years ago

I also can confirm working on 4.3. Thanks much!

bk138 commented 11 years ago

Schweet, closing then (but pls test out with fullscreen app without action bar as well..)