Status Update
Comments
da...@gmail.com <da...@gmail.com> #2
Same here. I have links in a local html file referencing file:///android_res/drawable/ and on all gradle build flavors using another applicationId (added suffix) the Webview only shows broken links.
This behaviour seems not to be connected solely to Android 5.0 since it occurs on Android 4.4.4 too (tested with current cyanogenmod 11 build).
This behaviour seems not to be connected solely to Android 5.0 since it occurs on Android 4.4.4 too (tested with current cyanogenmod 11 build).
Description
Component used: "androidx.activity:activity-compose:1.3.0-alpha02"
Devices/Android versions reproduced on: Pixel 4, Android 11
The new
androidx.activity.compose.BackHandler()
composable should useOnBackPressedDispatcher.addCallback(LifecycleOwner, OnBackPressedCallback)
to register its callback. This method will track the lifecycle to dynamically add/remove the callback when lifecycle state is STARTED/STOPPED.androidx.navigation library uses that method internally and using navigation and
BackHandler()
together shuffle the order of registered callbacks because navigation will removeNavController
callback when lifecycle is STOPPED, and re-add them when lifecyle is STARTED. This cause the callbacks to go from [navigation callback
,BackHandlerCallback
] on initial launch to [BackHandlerCallback
,navigation callback
] after STARTED-STOPPED-STARTED state transition. As the list is used in reverse order this causeBackHandler()
to get ignored.Using LifecycleOwner should get the BackHandler callback to be removed and re-added in the correct order