/** * Constructor to use when building a TranslateAnimation from code * * @param fromXDelta Change in X coordinate to apply at the start of the * animation * @param toXDelta Change in X coordinate to apply at the end of the * animation * @param fromYDelta Change in Y coordinate to apply at the start of the * animation * @param toYDelta Change in Y coordinate to apply at the end of the * animation */这是官方解释,也就是我们的动画的配置要动态改变,这将跟你的RecyclerView的index相关,第一个参数是你初始的位置,第二个是动画后的位置,index*ItemView的大小即可,代码不想贴出来了,一是因为你的需要和我的需要不一样,而是因为希望大家能从别人的博客学到知识作为己用,而不是一味的粘代码,有问题可以评论可以私聊
新闻热点
疑难解答