public class DividerItemDecoration
extends RecyclerView.ItemDecoration
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
HORIZONTAL |
static int |
VERTICAL |
| 构造器和说明 |
|---|
DividerItemDecoration(android.content.Context context,
int orientation)
Creates a divider
android.support.v7.widget.RecyclerView.ItemDecoration that can be
used with a
android.support.v7.widget.LinearLayoutManager. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
getItemOffsets(android.graphics.Rect outRect,
android.view.View view,
RecyclerView parent,
RecyclerView.State state) |
void |
onDraw(android.graphics.Canvas c,
RecyclerView parent,
RecyclerView.State state) |
void |
setDrawable(android.graphics.drawable.Drawable drawable)
Sets the
Drawable for this divider. |
void |
setOrientation(int orientation)
Sets the orientation for this divider.
|
public static final int HORIZONTAL
public static final int VERTICAL
public DividerItemDecoration(android.content.Context context,
int orientation)
android.support.v7.widget.RecyclerView.ItemDecoration that can be
used with a
android.support.v7.widget.LinearLayoutManager.context - Current context, it will be used to access resources.orientation - Divider orientation. Should be HORIZONTAL or
VERTICAL.public void setOrientation(int orientation)
android.support.v7.widget.RecyclerView.LayoutManager changes orientation.orientation - HORIZONTAL or VERTICALpublic void setDrawable(android.graphics.drawable.Drawable drawable)
Drawable for this divider.drawable - Drawable that should be used as a divider.public void onDraw(android.graphics.Canvas c,
RecyclerView parent,
RecyclerView.State state)
public void getItemOffsets(android.graphics.Rect outRect,
android.view.View view,
RecyclerView parent,
RecyclerView.State state)