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

No animation unless OvershootInterpolator is set #65

Open
radubn opened this issue Jan 19, 2016 · 0 comments
Open

No animation unless OvershootInterpolator is set #65

radubn opened this issue Jan 19, 2016 · 0 comments

Comments

@radubn
Copy link

radubn commented Jan 19, 2016

Hi. I am using only notifyItemRemoved() and notifyItemInserted(), so to avoid notifyDataSetChanged(). When I set the item animator on the RecyclerView, the animation when adding a new element (SlideInUpAnimator) is not shown, unless I set OvershootInterpolator too.

So, when using this code:

mRecyclerView.setItemAnimator(new SlideInUpAnimator());
mRecyclerView.getItemAnimator().setAddDuration(1000);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));

There is no animation. But with the next code, it shows the element sliding in from below, but with the bouncing effect (which I do not want to have):

mRecyclerView.setItemAnimator(new SlideInUpAnimator(new OvershootInterpolator()));
mRecyclerView.getItemAnimator().setAddDuration(1000);
mRecyclerView.setLayoutManager(new LinearLayoutManager(JobsUserActivity.this));

I am using these in gradle:

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'jp.wasabeef:recyclerview-animators:2.1.0'

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

1 participant