Cloneablepublic static class StackLayout.LayoutConfig extends ComponentContainer.LayoutConfig
StackLayout, which includes the width, height, and
page margin.| 限定符和类型 | 字段 | 说明 |
|---|---|---|
int |
alignment |
Indicates the alignment value of a control.
|
static int |
UNSPECIFIED_ALIGNMENT |
Indicates a alignment value that has not been set.
|
height, MATCH_CONTENT, MATCH_PARENT, width| 构造器 | 说明 |
|---|---|
LayoutConfig() |
The default constructor, which sets the default width and height to
MATCH_CONTENT. |
LayoutConfig(int width,
int height) |
A constructor used to set the width and height parameters of a layout.
|
LayoutConfig(int width,
int height,
int alignment) |
A constructor used to set the width, height, and alignment parameters of a layout.
|
LayoutConfig(ComponentContainer.LayoutConfig source) |
A constructor used to set layout parameters based on the width, height, and margin of the source layout.
|
LayoutConfig(StackLayout.LayoutConfig source) |
A constructor used to set layout parameters based on the width, height, margin, and alignment 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 int alignment
public LayoutConfig()
MATCH_CONTENT.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)
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)
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.public LayoutConfig(StackLayout.LayoutConfig source)
source - Specifies parameters of the source layout.public LayoutConfig(ComponentContainer.LayoutConfig source)
source - Specifies parameters of the source layout.