Skip to content

Disable Animation During RecyclerView Scrolling #62

Description

@deneme721a

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;
    }
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions