答案 0 :(得分:1)
我从这个回购中解决了我的问题 https://github.com/jordyamc/android-advancedrecyclerview/ BaseItemAnimationManager
import android.view.animation.Interpolator;
protected void resetAnimation(RecyclerView.ViewHolder holder) {
clearInterpolator(holder.itemView);
endAnimation(holder);
}
protected void clearInterpolator(View v) {
ViewCompat.setAlpha(v, 1.0F);
ViewCompat.setScaleY(v, 1.0F);
ViewCompat.setScaleX(v, 1.0F);
ViewCompat.setTranslationY(v, 0.0F);
ViewCompat.setTranslationX(v, 0.0F);
ViewCompat.setRotation(v, 0.0F);
ViewCompat.setRotationY(v, 0.0F);
ViewCompat.setRotationX(v, 0.0F);
//v.setPivotY((float)(v.getMeasuredHeight() / 2));
ViewCompat.setPivotX(v, (float) (v.getMeasuredWidth() / 2));
ViewCompat.animate(v).setInterpolator((Interpolator) null);
}