Cloneablepublic static class DirectionalLayout.LayoutConfig extends ComponentContainer.LayoutConfig
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
int |
alignment |
Indicates the alignment of the child component.
|
static int |
UNSPECIFIED_ALIGNMENT |
Indicates a alignment value that has not been set.
|
static float |
UNSPECIFIED_WEIGHT |
Indicates a weight that has not been set.
|
float |
weight |
Indicates the weight of the child component.
|
height, MATCH_CONTENT, MATCH_PARENT, width| 构造器 | 说明 |
|---|---|
LayoutConfig() |
Default constructor used to create a
LayoutConfig instance with the width and height set to
ComponentContainer.LayoutConfig#MATCH_CONTENT by
default. |
LayoutConfig(int width,
int height) |
A constructor used to create a
LayoutConfig instance based on the specified width and height. |
LayoutConfig(int width,
int height,
int alignment,
float weight) |
A constructor used to create a
LayoutConfig instance based on the specified width, height,
alignment, and weight. |
LayoutConfig(ComponentContainer.LayoutConfig source) |
A constructor used to set layout parameters based on the width and height of the source layout.
|
LayoutConfig(DirectionalLayout.LayoutConfig source) |
A constructor used to set layout parameters based on the width, height, margin, alignment,
and weight of the source layout.
|
LayoutConfig(Context context,
AttrSet attrSet) |
A constructor used to create a
LayoutConfig instance based on the context and attribute set. |
clone, getHorizontalEndMargin, getHorizontalStartMargin, getLayoutDirection, getMarginBottom, getMarginLeft, getMarginRight, getMargins, getMarginsLeftAndRight, getMarginsTopAndBottom, getMarginTop, isMarginsRelative, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginsLeftAndRight, setMarginsRelative, setMarginsTopAndBottom, setMarginToppublic static final int UNSPECIFIED_ALIGNMENT
public static final float UNSPECIFIED_WEIGHT
public int alignment
public float weight
public LayoutConfig()
LayoutConfig instance with the width and height set to
ComponentContainer.LayoutConfig#MATCH_CONTENT by
default.public LayoutConfig(Context context, AttrSet attrSet)
LayoutConfig instance based on the context and attribute set.context - Indicates the application context.attrSet - Indicates the attribute set to be used.public LayoutConfig(int width,
int height)
LayoutConfig instance based on the specified width and height.width - Specifies the width, which can be a particular value, or ComponentContainer.LayoutConfig.MATCH_PARENT
or ComponentContainer.LayoutConfig.MATCH_CONTENT.height - Specifies the height, which can be a particular value, or ComponentContainer.LayoutConfig.MATCH_PARENT
or ComponentContainer.LayoutConfig.MATCH_CONTENT.public LayoutConfig(int width,
int height,
int alignment,
float weight)
LayoutConfig instance based on the specified width, height,
alignment, and weight.width - Specifies the width, which can be a particular value, or ComponentContainer.LayoutConfig.MATCH_PARENT
or ComponentContainer.LayoutConfig.MATCH_CONTENT.height - Specifies the height, which can be a particular value, or ComponentContainer.LayoutConfig.MATCH_PARENT
or ComponentContainer.LayoutConfig.MATCH_CONTENT.alignment - Specifies the alignment value.weight - Specifies the weight value.public LayoutConfig(ComponentContainer.LayoutConfig source)
source - Specifies parameters of the source layout.public LayoutConfig(DirectionalLayout.LayoutConfig source)
source - Specifies parameters of the source layout.