ItemTouchExpandpublic abstract class ListAdornment extends Object
You can customize the drawing (for example, using a divider) before or after the ListComponent is drawn.
| 限定符和类型 | 类 | 说明 |
|---|---|---|
protected static class |
ListAdornment.ListAdornmentCleaner |
Implements the release of the
ListAdornment object. |
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected long |
mNativePtr |
The pointer to a native ListAdornment object.
|
| 构造器 | 说明 |
|---|---|
ListAdornment() |
A constructor used to create a
ListAdornment instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
afterDrawCallback(Canvas canvas,
ListComponent parent,
ListState uiState) |
Draws a
ListAdornment after drawing a component. |
void |
beforeDrawCallback(Canvas canvas,
ListComponent parent,
ListState uiState) |
Draws a
ListAdornment before drawing a component. |
protected void |
createNativePtr() |
Creates a native pointer to this
ListAdornment instance. |
void |
getItemDeltas(Rect rect,
Component component,
ListComponent parent,
ListState uiState) |
Obtains the offset of the four boundaries of the specified component in this
ListAdornment. |
long |
getNativePtr() |
Obtains the native object.
|
public ListAdornment()
ListAdornment instance.public long getNativePtr()
protected void createNativePtr()
ListAdornment instance.public void beforeDrawCallback(Canvas canvas, ListComponent parent, ListState uiState)
ListAdornment before drawing a component.canvas - Indicates the canvas used for drawing.parent - Indicates the ListComponent corresponding to the ListAdornment.uiState - Indicates the status of the ListComponent.public void afterDrawCallback(Canvas canvas, ListComponent parent, ListState uiState)
ListAdornment after drawing a component.canvas - Indicates the canvas used for drawing.parent - Indicates the ListComponent corresponding to the ListAdornment.uiState - Indicates the status of the ListComponent.public void getItemDeltas(Rect rect, Component component, ListComponent parent, ListState uiState)
ListAdornment.
You need to implement this method.
rect - Indicates the rectangle used to store the offset of the four boundaries.component - Indicates the component.parent - Indicates the ListComponent corresponding to the ListAdornment.uiState - Indicates the status of the ListComponent.