public class DividerItemDecoration
extends androidx.recyclerview.widget.RecyclerView.ItemDecoration
| 构造器和说明 |
|---|
DividerItemDecoration(android.content.Context context,
int orientation)
构造方法传入布局方向,不可不传
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
getItemOffsets(android.graphics.Rect outRect,
android.view.View view,
androidx.recyclerview.widget.RecyclerView parent,
androidx.recyclerview.widget.RecyclerView.State state)
设置item分割线的size
|
void |
onDraw(android.graphics.Canvas c,
androidx.recyclerview.widget.RecyclerView parent,
androidx.recyclerview.widget.RecyclerView.State state) |
public DividerItemDecoration(android.content.Context context,
int orientation)
context - orientation - public void onDraw(android.graphics.Canvas c,
androidx.recyclerview.widget.RecyclerView parent,
androidx.recyclerview.widget.RecyclerView.State state)
onDraw 在类中 androidx.recyclerview.widget.RecyclerView.ItemDecorationpublic void getItemOffsets(android.graphics.Rect outRect,
android.view.View view,
androidx.recyclerview.widget.RecyclerView parent,
androidx.recyclerview.widget.RecyclerView.State state)
getItemOffsets 在类中 androidx.recyclerview.widget.RecyclerView.ItemDecorationoutRect - view - parent - state -