友情提示,长文,建议收藏后仔细阅读。RecyclerView 可以列为开发过程中非常常见的控件之一,所以在其身上投入一些精力是非常值得的。前言本文主要通过以下几个方面来讲解RecyclerView的布局和动画原理:1、布局放置:RecyclerView#dispatchLayout()2、预布局阶段:RecyclerView#dispatchLayoutStep1()3、布局阶段:RecyclerView#dispatchLayoutStep2()4、开启动画阶段:RecyclerView#dispatchLayoutStep3()背景知识RecyclerView的Adapter有几个notify相关的方法:notifyDataSetChanged()notifyItemChanged(int)notifyItemInserted(int)notifyItemRemoved(int)notifyItemRangeChanged(int, int)notifyItemRangeInserted(int, int)notifyItemRangeRemoved(int, int)notifyItemMoved(int, int)notifyDataSetChanged()与其他方法的区别:1、会导致整个列表刷新,其它几个方法则不会;2、不会触发Re
………………………………