architecture-components-samples icon indicating copy to clipboard operation
architecture-components-samples copied to clipboard

bugs NavigationAdvancedSample : screen white

Open fadibouteraa opened this issue 5 years ago • 3 comments

I have tried navigation adventure (demo), it looks good and it is intuitive; however, It has come to my attention that after performing a stress test on the navigation buttons, it bugs: the screen whitens out

leaderboard

fadibouteraa avatar Dec 12 '19 09:12 fadibouteraa

Duplicate of #773

saharshpruthi avatar Jan 07 '20 06:01 saharshpruthi

I solved the problem.The problem is the timing of the animation call. You just need to change it. fragmentManager.beginTransaction() .setCustomAnimations( R.anim.nav_default_enter_anim, R.anim.nav_default_exit_anim, R.anim.nav_default_pop_enter_anim, R.anim.nav_default_pop_exit_anim) .attach(selectedFragment) .setPrimaryNavigationFragment(selectedFragment) .apply { // Detach all other Fragments graphIdToTagMap.forEach { _, fragmentTagIter -> if (fragmentTagIter != newlySelectedItemTag) { detach(fragmentManager.findFragmentByTag(firstFragmentTag)!!) } } } .addToBackStack(firstFragmentTag) .setReorderingAllowed(true) .commit() after modification. fragmentManager.beginTransaction() .attach(selectedFragment) .setPrimaryNavigationFragment(selectedFragment) .apply { // Detach all other Fragments graphIdToTagMap.forEach { _, fragmentTagIter -> if (fragmentTagIter != newlySelectedItemTag) { detach(fragmentManager.findFragmentByTag(firstFragmentTag)!!) } } } .addToBackStack(firstFragmentTag) .setCustomAnimations( R.anim.nav_default_enter_anim, R.anim.nav_default_exit_anim, R.anim.nav_default_pop_enter_anim, R.anim.nav_default_pop_exit_anim) .setReorderingAllowed(true) .commit()

RDSunhy avatar Jan 08 '20 03:01 RDSunhy

@fadibouteraa In the NavigationAdvancedSample, navigation is 2.2.0-alpha01, modified to 2.1.0.And all beta versions will be corrected.

RDSunhy avatar Jan 09 '20 03:01 RDSunhy