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

Disable Animation During RecyclerView Scrolling #62

Open
deneme721a opened this issue Apr 21, 2024 · 2 comments
Open

Disable Animation During RecyclerView Scrolling #62

deneme721a opened this issue Apr 21, 2024 · 2 comments

Comments

@deneme721a
Copy link

deneme721a commented Apr 21, 2024

I don't want the animation to constantly change while scrolling through the RecyclerView. How can I solve this?

I just want it to be animated while I'm checking out. For example switchButton.setChecked(boolean state, boolean animate);

Can you make such a method? @zcweng @IvanAbakumov @msdx
I found a solution like this, but it is not healthy at all. I first remove the animation with enable effect and then turn it on during touch, but this is not the right approach. Can you please create a solution like I said?

holder.switchButton.setEnableEffect(false);
holder.switchButton.setChecked(itemModels.get(position).isEnabled());

holder.switchButton.setOnTouchListener(new View.OnTouchListener() {
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        holder.switchButton.setEnableEffect(true);
        return false;
    }
});
@developmans
Copy link

developmans commented Apr 21, 2024 via email

@deneme721a
Copy link
Author

Can you add something like this? @zcweng

switchButton.setChecked(boolean state, boolean animate);

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

No branches or pull requests

2 participants