编写RecyclerView.ItemDecoration时,在onDraw方法中,Drawable的高度等于RecyclerView的高度减去RecyclerView的上下padding. @Override public void onDraw(Canvas c, RecyclerView parent, State state) { int top = parent.getPaddingTop(); int bottom = parent.getHeight() - parent.getP
去年google的IO上就展示了一个新的ListView.它就是RecyclerView. 下面是官方的说明,我英语能力有限,只是我大概这么理解:RecyclerView会比ListView更具有拓展性,使用更有效率,并且更灵活了,详细怎么样,时隔一年,我们也发现了它越来越强大,所以有必要去认识一下这个小伙伴了. The RecyclerView widget is a more advanced and flexible version of ListView. This widget is