chip-navigation-bar
chip-navigation-bar copied to clipboard
Noticeable lag while clicking on a button
While clicking on a Chip on the bottom navbar, I see quite some amount of lag.
I hope this can be fixed :)
Thanks for the report.
Are you able to reproduce this lag on the sample app? Did you try to isolate your callback action to make sure is the menu which is causing the lag?
I noticed that it happens only when I use a recyclerview(via fastadapter) in the same layout as the chipnavigationbar. I tried removing the recyclerview and the animations were smooth.
I hope you could help me out.
I was not able to reproduce the lag issues during the animations. Please push a sample repository with your problem or give me more details like your XML layouts and how you're creating the recyclerview.
Okay, sure!
Closing due inactivity. Feel free to reopen if you still facing the problem
I was only able to reproduce this when during a fragment transaction with some heavy layouts.
But I don't think it's a problem from the library side. I found similar issues on DrawerLayout from Google when the user interacts with the menu and an animation to close the panel is being performed.
Some menu animations get lags when it runs at the same time when you're performing a FragmentTransaction. You can turnaround this issue by avoiding performing all your UI inflation and binding right after the menu selection.
I got this problem too,
I solve this by running a handler with postDelay function after finish the animation of changing button states and then attach fragments
but I think we can solve this problem inside the library side
this could be a big UI/UX issue for who are using this library
hey did it fix on this latest version 1.3.4 ?
No. There is no solution for this issue on the library side yet. If you're facing lag for heavy layouts during fragment transactions I recommend in some way to schedule these heavy operations behind a delay, loader, transition, or skeleton screens.
I got this problem too, I solve this by running a handler with
postDelayfunction after finish the animation of changing button states and then attach fragments but I think we can solve this problem inside the library side this could be a big UI/UX issue for who are using this library
bro would you provide the example code for doing this? @nekooei