【问题标题】:Android RecyclerView circular reveal animationAndroid RecyclerView 循环显示动画
【发布时间】:2017-10-09 15:15:29
【问题描述】:

如何实现 RecyclerView ItemAnimator 以便在添加新项目时显示圆形显示动画,如下例所示。

https://media.giphy.com/media/xT9IgIHforlj3uTwD6/giphy.gif

【问题讨论】:

  • 尝试使用 Wasabeef 的 recyclerview animator 的 Scaleintop 动画

标签: android animation android-recyclerview


【解决方案1】:

En el onClick 甚至可以调用 circularReveal:

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
   public static void circularReveal(View v){
       if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
           int finalRadius = Math.max(v.getWidth(), v.getHeight()) / 2;
           TransitionManager.beginDelayedTransition((ViewGroup) v);
           Animator anim = ViewAnimationUtils.createCircularReveal(v, v.getWidth() / 2, v.getHeight() / 2, 0, finalRadius);
           anim.start();
       }
   }

【讨论】:

    猜你喜欢
    • 2023-03-11
    • 2016-04-11
    • 1970-01-01
    • 1970-01-01
    • 2014-07-10
    • 2017-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多