说道ItemDecoration不得不说三个方法:
/**
* @param c 画布
* @param parent RecyleView
* @param state RecyclerView的当前状态
*/
@Override(http://www.my516.com)
public void onDraw(Canvas c, RecyclerView parent,RecyclerView.State state) {
1
2
3
4
5
6
7
8
/**
* @param outRect
* @param view RecycleView的itemView
* @param parent RecycleView
* @param state RecycleView 的状态
*/
@Override
public void getItemOffsets(Rect outRect,View view, RecyclerView parent, RecyclerView.State state)
1
2
3
4
5
6
7
8
/**
* @param c 画布
* @param parent RecycleView
* @param state RecycleView的状态
*/
@Override
public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state)
————————————————
手机扫一扫
移动阅读更方便
你可能感兴趣的文章