You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IllegalStateException: Cannot change whether this adapter has stable IDs while the adapter has registered observers
Stacktrace
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mikepenz.materialdrawer.app.debug/com.mikepenz.materialdrawer.app.DrawerActivity}: java.lang.IllegalStateException: Cannot change whether this adapter has stable IDs while the adapter has registered observers.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.IllegalStateException: Cannot change whether this adapter has stable IDs while the adapter has registered observers.
at androidx.recyclerview.widget.RecyclerView$Adapter.setHasStableIds(RecyclerView.java:7142)
at com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView.setHasStableIds(MaterialDrawerSliderView.kt:291)
at com.mikepenz.materialdrawer.app.DrawerActivity$onCreate$2.invoke(DrawerActivity.kt:93)
at com.mikepenz.materialdrawer.app.DrawerActivity$onCreate$2.invoke(DrawerActivity.kt:29)
at com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView.apply(MaterialDrawerSliderView.kt:843)
at com.mikepenz.materialdrawer.app.DrawerActivity.onCreate(DrawerActivity.kt:92)
at android.app.Activity.performCreate(Activity.java:7802)
at android.app.Activity.performCreate(Activity.java:7791)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Details
Used library version: 8.0.0 / current develop
The text was updated successfully, but these errors were encountered:
@connyduck the FastAdapter should have hasStableIds by default.
I am not sure if this is a real bug of the drawer. as this behavior comes from the adapter itself.
you'd have to remove the adapter from the drawers recyclerview and set it again :/
Ok as we offer this method it should also behave. will have a look
About this issue
hasStableIds
to true on theMaterialDrawerSliderView
, the app crasheshasStableIds = true
to the sample app, e.g. here https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt#L93IllegalStateException: Cannot change whether this adapter has stable IDs while the adapter has registered observers
Stacktrace
Details
The text was updated successfully, but these errors were encountered: