Assigned
Status Update
Comments
qq...@google.com <qq...@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.
22...@qq.com <22...@qq.com> #3
Turns out, we already had a tracking bug for this issue, will follow up on that other one.
22...@qq.com <22...@qq.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.
Description
Version used:1.1.0
Devices/Android versions reproduced on:Android 8.0
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).
We called setStyle to textView.getPaint() to make the text seem like a bold-style text
the code is like:
textView.getPaint().setStyle(Paint.Style.FILL_AND_STROKE);
float dimension = context.getResources().getDimension(resDimen);
textView.getPaint().setStrokeWidth(dimension);
textView.invalidate();
but after we set this ,we can not see the emoji on the TextView.
We only reproduced this on a Samsung C7 phone with android 8.0. and other device is normal.
The left side of the image set the style, the right side of the image didnt set the style