Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noticeable lag while clicking on a button #3

Open
jashasweejena opened this issue Jul 24, 2019 · 10 comments
Open

Noticeable lag while clicking on a button #3

jashasweejena opened this issue Jul 24, 2019 · 10 comments
Labels
enhancement New feature or request

Comments

@jashasweejena
Copy link

While clicking on a Chip on the bottom navbar, I see quite some amount of lag.

I hope this can be fixed :)

@ismaeldivita
Copy link
Owner

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?

@jashasweejena
Copy link
Author

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.

@ismaeldivita
Copy link
Owner

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.

@jashasweejena
Copy link
Author

Okay, sure!

@ismaeldivita
Copy link
Owner

Closing due inactivity. Feel free to reopen if you still facing the problem

@ismaeldivita ismaeldivita reopened this Nov 4, 2019
@ismaeldivita ismaeldivita added the bug Something isn't working label Nov 4, 2019
@ismaeldivita
Copy link
Owner

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.

@ismaeldivita ismaeldivita removed the bug Something isn't working label Nov 11, 2019
@nekooei
Copy link

nekooei commented Feb 22, 2020

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

@oussamalahrizi
Copy link

hey did it fix on this latest version 1.3.4 ?

@ismaeldivita
Copy link
Owner

ismaeldivita commented Oct 24, 2020

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.

@ismaeldivita ismaeldivita added enhancement New feature or request help wanted Extra attention is needed labels Oct 24, 2020
@ismaeldivita ismaeldivita removed the help wanted Extra attention is needed label May 4, 2021
@milon27
Copy link

milon27 commented Jun 24, 2021

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

bro would you provide the example code for doing this?
@nekooei

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants