[BottomAppBar] Replacing menu while changing fab alignment mode causes flickering
See original GitHub issueDescription: If you change the fab alignment mode and replace the menu in the BottomAppBar the items get replaced 2 times. It looks like the icons are flickering.
Expected behavior: There should be a smooth transition of the items if they change the side in the BottomAppBar. Also the animation should not be affected, if in this time the menu items change.
Source code:
controller.addOnDestinationChangedListener(new NavController.OnDestinationChangedListener(){
@Override
public void onDestinationChanged(@NonNull NavController controller, @NonNull NavDestination destination, @Nullable Bundle arguments){
if (destination.getId() == R.id.homeFragment){
bottomAppBar.setNavigationIcon(R.drawable.ic_menu);
bottomAppBar.setFabAlignmentMode(BottomAppBar.FAB_ALIGNMENT_MODE_CENTER);
bottomAppBar.replaceMenu(R.menu.home_fragment_menu);
}else{
bottomAppBar.setNavigationIcon(null);
bottomAppBar.setFabAlignmentMode(BottomAppBar.FAB_ALIGNMENT_MODE_END);
bottomAppBar.replaceMenu(R.menu.details_fragment_menu);
}
}
});
Android API version: 29
Material Library version: Material Android Library version you are using here (e.g., 1.2.0-alpha03)
Device: Pixel 3 Emulator
To help us triage faster, please check to make sure you are using the latest version of the library.
We also happily accept pull requests.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:6 (1 by maintainers)
Top Results From Across the Web
android - Blinking effect on bottom app bar when change ...
I want to change fab alignment and menu when I selecting an item in my list. The changes work great but the animation...
Read more >Implementing Google's newly launched Bottom AppBar |
FAB Alignment Mode — app:fabAlignmentMode. FAB Attached — app:fabAttached ... and then change the BottomAppBar Alignment from CENTRE to END (vice/versa).
Read more >Phone Screen Display Glitching, Flickering & Flashing - Updato
Before you sweat a bucket, check out our complete guide on how to fix Android screen flickering issue the easy way. In the...
Read more >124.2.0 - Google Git
... change. (Alyssa Weiss); Fix Bottom sheet bug that was causing flickering. ... Add shape API to allow changing FAB's shape after it...
Read more >Default Theme Changelog - Kendo UI for Vue - Telerik
Change variable name from $list-* to $kendo-list-* . menu: Convert monolithic menu styles to multiple class names; menu-button: Convert monolithic menu ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same behavior with me. Tested with
1.1.0
and1.2.0-alpha04
.In addition, the menu is replaced first and then the FAB moves, as you can see below:
BottomAppBarDemo.zip @hunterstich Please check it out