预览
思路
纵向的RecyclerView完全没有难度,主要是指示器(IndicatorView)的动画,下面主要说IndicatorView的实现
1. TranslationY
动画:由初始位置滑动到点击的当前位置
ObjectAnimator animator = ObjectAnimator.ofFloat(this, "TranslationY", oldY, newY);
animator.setDuration(500);
animator.setInterpolator(new OvershootInterpolator());
animator.start();
- 获取当前位置:RecyclerVi