Assigned
Status Update
Comments
wa...@google.com <wa...@google.com>
ow...@gmail.com <ow...@gmail.com> #2
This actually has nothing to do with NavHostFragment, but is the behavior of NavController's setGraph().
When you call navController.setGraph(R.navigation.navigation_graph), it stores that ID and will restore that ID automatically.
If you were to instead use:
NavInflater navInflater = new NavInflater(this, navController.getNavigatorProvider());
navController.setGraph(navInflater.inflate(R.navigation.navigation_graph));
Then NavController would not restore the graph itself and the call to restoreState() you point out would only restore the back stack state, etc. but would wait for you to call setGraph again.
You're right that the inconsistency between the two setGraph methods is concerning. We'll take a look.
When you call navController.setGraph(R.navigation.navigation_graph), it stores that ID and will restore that ID automatically.
If you were to instead use:
NavInflater navInflater = new NavInflater(this, navController.getNavigatorProvider());
navController.setGraph(navInflater.inflate(R.navigation.navigation_graph));
Then NavController would not restore the graph itself and the call to restoreState() you point out would only restore the back stack state, etc. but would wait for you to call setGraph again.
You're right that the inconsistency between the two setGraph methods is concerning. We'll take a look.
li...@google.com <li...@google.com> #3
Turns out, we already had a tracking bug for this issue, will follow up on that other one.
da...@garmin.com <da...@garmin.com> #4
Thank you for promptly replying to my report. You are right that the issue you've just mentioned is similar to mine. I shall continue observing the progress over there.
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 13c38f066f29fc873b5030dd1c77b0e753c3544a
Author: Lin Guo <linguo@google.com>
Date: Tue Jul 11 02:52:31 2023
Synchronize reading and writing files
Test: manual
Bug: 282802114
Change-Id: I353e467c6dda16276ace15b15921c81012c78d6d
M emoji2/emoji2-emojipicker/src/main/java/androidx/emoji2/emojipicker/utils/FileCache.kt
https://android-review.googlesource.com/2652404
Branch: androidx-main
commit 13c38f066f29fc873b5030dd1c77b0e753c3544a
Author: Lin Guo <linguo@google.com>
Date: Tue Jul 11 02:52:31 2023
Synchronize reading and writing files
Test: manual
Bug: 282802114
Change-Id: I353e467c6dda16276ace15b15921c81012c78d6d
M emoji2/emoji2-emojipicker/src/main/java/androidx/emoji2/emojipicker/utils/FileCache.kt
li...@google.com <li...@google.com> #6
Hi Venkata, can you test the following apks?
The ones with "before" prefix are the original emoji picker testing samples apps and see if we can repro this issue. The ones with "after" prefix are the ones including the fixes and see if these issues are fixed. I included both the debug apk and release apk.
Description
Component used: Emoji2 Emojipicker Version used: Version 1.0.0-alpha03 Devices/Android versions reproduced on: Various
Seeing this issue upon beta'ing the emojipicker. happens uncommonly, various devices.