Cloneablepublic static class ListComponent.ListLayoutConfig extends ComponentContainer.LayoutConfig
ComponentContainer.LayoutConfig and provides methods to enable a component in the
ListComponent to access the corresponding ComponentOwner.height, MATCH_CONTENT, MATCH_PARENT, width| 构造器 | 说明 |
|---|---|
ListLayoutConfig() |
Default constructor used to create a
ListLayoutConfig instance. |
ListLayoutConfig(int width,
int height) |
A constructor used to create a
ListLayoutConfig instance based on the specified width and height. |
ListLayoutConfig(ComponentContainer.LayoutConfig source) |
A constructor used to create a
ListLayoutConfig instance based on an existing
ComponentContainer.LayoutConfig instance. |
ListLayoutConfig(ListComponent.ListLayoutConfig source) |
A constructor used to create a
ListLayoutConfig instance based on an existing
ListLayoutConfig instance. |
ListLayoutConfig(Context context,
AttrSet attrSet) |
A constructor used to create a
ListLayoutConfig instance based on the specified attribute set. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
applyToComponent(Component component) |
|
ComponentOwner |
getComponentOwner() |
Obtains the
ComponentOwner corresponding to this ListLayoutConfig. |
boolean |
getFullLane() |
Checks whether the component corresponding to this
ListLayoutConfig occupies all lanes in the
masonry layout. |
void |
setComponentOwner(ComponentOwner componentOwner) |
Sets a component owner.
|
void |
setFullLane(boolean fullLane) |
Sets whether the component corresponding to this
ListLayoutConfig occupies all lanes in the masonry
layout. |
clone, getHorizontalEndMargin, getHorizontalStartMargin, getLayoutDirection, getMarginBottom, getMarginLeft, getMarginRight, getMargins, getMarginsLeftAndRight, getMarginsTopAndBottom, getMarginTop, isMarginsRelative, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginsLeftAndRight, setMarginsRelative, setMarginsTopAndBottom, setMarginToppublic ListLayoutConfig()
ListLayoutConfig instance.
The width and height of this instance are set to MATCH_CONTENT by default.
public ListLayoutConfig(Context context, AttrSet attrSet)
ListLayoutConfig instance based on the specified attribute set.context - Indicates the application context.attrSet - Indicates the attribute set to use.public ListLayoutConfig(int width,
int height)
ListLayoutConfig instance based on the specified width and height.width - Indicates the width, in pixels.
The value can be ComponentContainer.LayoutConfig.MATCH_CONTENT or ComponentContainer.LayoutConfig.MATCH_PARENT.height - Indicates the height, in pixels.
The value can be ComponentContainer.LayoutConfig.MATCH_CONTENT or ComponentContainer.LayoutConfig.MATCH_PARENT.public ListLayoutConfig(ComponentContainer.LayoutConfig source)
ListLayoutConfig instance based on an existing
ComponentContainer.LayoutConfig instance.source - Indicates the existing ComponentContainer.LayoutConfig instance to use.public ListLayoutConfig(ListComponent.ListLayoutConfig source)
ListLayoutConfig instance based on an existing
ListLayoutConfig instance.source - Indicates the existing ListLayoutConfig instance to use.public ComponentOwner getComponentOwner()
ComponentOwner corresponding to this ListLayoutConfig.ComponentOwner if obtained; returns null if no owner is set.public void setComponentOwner(ComponentOwner componentOwner)
componentOwner - Indicates the component owner to set.public void applyToComponent(Component component)
public void setFullLane(boolean fullLane)
ListLayoutConfig occupies all lanes in the masonry
layout.fullLane - Specifies whether the component occupies all the lanes. The value true means that
the component occupies all the lanes, and false means the opposite.public boolean getFullLane()
ListLayoutConfig occupies all lanes in the
masonry layout.true if the component occupies all the lanes; returns false otherwise.