Assigned
Status Update
Comments
ha...@google.com <ha...@google.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.
Description
Version used:1.5.0
Devices/Android versions reproduced on:All
i just simply using this library in my project with 1.2.0 version and i just update the library to 1.5.0 version( implementation 'androidx.emoji2:emoji2:1.5.0') so my app getting crash on any <EditText or <com.google.android.material.textfield.TextInputEditText
later i figure out it is due to android:text="@={viewModel.prefix}" earlier it's working fine for me on 1.2.0 version
i resolve it by downgrade the version without changing any code.
but i fix this issue in 1.5.0 version also by setting binding.etPrefix.isEmojiCompatEnabled = false
let me add one more thing in my prefix i have plus (+) sign with country code.