新聞中心
StackLayout.LayoutConfig

java.lang.Object
|---ohos.agp.components.ComponentContainer.LayoutConfig
|---|---ohos.agp.components.StackLayout.LayoutConfig
public static class StackLayout.LayoutConfig
extends ComponentContainer.LayoutConfig
配置 StackLayout 的布局參數(shù),包括寬度、高度和頁邊距。
Since:
3
字段摘要
| 修飾符和類型 | 字段 | 描述 |
|---|---|---|
| int | alignment | 指示控件的對齊值。 |
| static int | UNSPECIFIED_ALIGNMENT | 表示尚未設(shè)置的對齊值。 |
| 從類 ohos.agp.components.ComponentContainer.LayoutConfig 繼承的字段 |
|---|
| height, MATCH_CONTENT, MATCH_PARENT, width |
構(gòu)造函數(shù)摘要
| 構(gòu)造函數(shù) | 描述 |
|---|---|
| LayoutConfig() | 默認(rèn)構(gòu)造函數(shù),將默認(rèn)寬度和高度設(shè)置為 MATCH_CONTENT。 |
| LayoutConfig(int width, int height) | 用于設(shè)置布局的寬度和高度參數(shù)的構(gòu)造函數(shù)。 |
| LayoutConfig(int width, int height, int alignment) | 用于設(shè)置布局的寬度、高度和對齊參數(shù)的構(gòu)造函數(shù)。 |
| LayoutConfig(ComponentContainer.LayoutConfig source) | 用于根據(jù)源布局的寬度、高度和邊距設(shè)置布局參數(shù)的構(gòu)造函數(shù)。 |
| LayoutConfig(StackLayout.LayoutConfig source) | 用于根據(jù)源布局的寬度、高度、邊距和對齊方式設(shè)置布局參數(shù)的構(gòu)造函數(shù)。 |
| LayoutConfig(Context context, AttrSet attrSet) | 用于根據(jù)上下文和屬性集創(chuàng)建 LayoutConfig 實例的構(gòu)造函數(shù)。 |
方法總結(jié)
| 從類 ohos.agp.components.ComponentContainer.LayoutConfig 繼承的方法 |
|---|
| clone, getHorizontalEndMargin, getHorizontalStartMargin, getLayoutDirection, getMarginBottom, getMarginLeft, getMarginRight, getMargins, getMarginsLeftAndRight, getMarginsTopAndBottom, getMarginTop, isMarginsRelative, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginsLeftAndRight, setMarginsRelative, setMarginsTopAndBottom, setMarginTop |
| 從類 java.lang.Object 繼承的方法 |
|---|
| equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段詳細(xì)信息
UNSPECIFIED_ALIGNMENT
public static final int UNSPECIFIED_ALIGNMENT
表示尚未設(shè)置的對齊值。
alignment
public int alignment
指示控件的對齊值。
構(gòu)造函數(shù)詳細(xì)信息
LayoutConfig
public LayoutConfig()
默認(rèn)構(gòu)造函數(shù),將默認(rèn)寬度和高度設(shè)置為 MATCH_CONTENT。
Since:
3
LayoutConfig
public LayoutConfig(Context context, AttrSet attrSet)
用于根據(jù)上下文和屬性集創(chuàng)建 LayoutConfig 實例的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| context | 指示應(yīng)用程序上下文。 |
| attrSet | 指示要使用的屬性集。 |
Since:
3
LayoutConfig
public LayoutConfig(int width, int height)
用于設(shè)置布局的寬度和高度參數(shù)的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| width | 指定寬度,可以是特定值,也可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。 |
| height | 指定高度,可以是特定值,也可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。 |
Since:
3
LayoutConfig
public LayoutConfig(int width, int height, int alignment)
用于設(shè)置布局的寬度、高度和對齊參數(shù)的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| width | 指定寬度,可以是特定值,也可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。 |
| height | 指定高度,可以是特定值,也可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。 |
| alignment | 指定對齊值。 |
Since:
3
LayoutConfig
public LayoutConfig(StackLayout.LayoutConfig source)
用于根據(jù)源布局的寬度、高度、邊距和對齊方式設(shè)置布局參數(shù)的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| source | 指定源布局的參數(shù)。 |
Since:
3
LayoutConfig
public LayoutConfig(ComponentContainer.LayoutConfig source)
用于根據(jù)源布局的寬度、高度和邊距設(shè)置布局參數(shù)的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| source | 指定源布局的參數(shù)。 |
Since:
3
當(dāng)前題目:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSStackLayout.LayoutConfig
網(wǎng)站路徑:http://www.dlmjj.cn/article/djscioh.html


咨詢
建站咨詢
