Compatibility issue with Pro UI RadSideDrawer component
See original GitHub issueThe main navigation of my app is managed by the RadSideDrawer component of Telerik Pro UI. A page in the main section shows a map with some markers. On marker select event a page in a subfolder is opened. The page shows detailed information about the selected marker, following the pattern implemented in Master Detail Template.
The navigation to the detail page works fine using the topmost.navigate()
method, but when I try to go back to the map page using topmost.goBack();
or the Android device back button I receive this error:
System.err: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to com.telerik.android.primitives.widget.sidedrawer.SideDrawerState
System.err: at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.onRestoreInstanceState(RadSideDrawer.java:784)
System.err: at android.view.View.dispatchRestoreInstanceState(View.java:17445)
System.err: at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3693)
System.err: at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3699)
System.err: at android.view.View.restoreHierarchyState(View.java:17423)
System.err: at android.app.Fragment.restoreViewState(Fragment.java:653)
System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299)
System.err: at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1547)
System.err: at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1609)
System.err: at android.app.BackStackRecord.executePopOps(BackStackRecord.java:865)
System.err: at android.app.FragmentManagerImpl.executeOps(FragmentManager.java:2389)
System.err: at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2187)
System.err: at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2140)
System.err: at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2047)
System.err: at android.app.FragmentManagerImpl$1.run(FragmentManager.java:718)
System.err: at android.os.Handler.handleCallback(Handler.java:769)
System.err: at android.os.Handler.dispatchMessage(Handler.java:98)
System.err: at android.os.Looper.loop(Looper.java:164)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6540)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
The same error occurs in all Android devices and emulators that I have tested (Nexus 5, Nexus 6P, Huawei P10).
TNS Core Modules are at version 3.3.0, NativeScript Pro UI is at version 3.2.0 (the last one at the moment I write), nativescript-google-maps-sdk is at version 2.4.3.
I published this basic app to highlight the issue: https://github.com/alexmeia/nativescritp-sidedrawer-and-googlemaps
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8
Top GitHub Comments
Thank you @StrahinjaCav for the suggestion. Whit the SideDrawer component I solved the problem in a not optimal but effective way, forcing the initialization of the SideDrawer on first application access. It seems that if the UI component sets its references to Java objects before the MapView does, the bug is bypassed. The solution you link seems less specific, I will try it.
Hi, i had the same issue and have sort of managed to solve it by following first part of this post and saving and restoring reference to MapView myself.
Its not the prettiest solution but didnt find any other way
P.S. you can try following the whole post isntructions but i was unable to make it work that way