新聞中心
TableLayout.LayoutConfig

java.lang.Object
|---ohos.agp.components.ComponentContainer.LayoutConfig
|---|---ohos.agp.components.TableLayout.LayoutConfig
public static class TableLayout.LayoutConfig
extends ComponentContainer.LayoutConfig提供表格布局所需的布局配置。
表格布局配置集成了 ComponentContainer.LayoutConfig 并提供了 TableLayout.Specification。 前者表示組件容器中的邊距布局配置,后者表示行和列規(guī)范。
Since:
3
字段摘要
| 修飾符和類型 | 字段 | 描述 |
|---|---|---|
| TableLayout.Specification | columnSpec | 指示表格布局中的列規(guī)范。 |
| TableLayout.Specification | rowSpec | 指示表格布局中的行規(guī)范。 |
| 從類 ohos.agp.components.ComponentContainer.LayoutConfig 繼承的字段 |
|---|
| height, MATCH_CONTENT, MATCH_PARENT, width |
構(gòu)造函數(shù)摘要
| 構(gòu)造函數(shù) | 描述 |
|---|---|
| LayoutConfig() | 用于創(chuàng)建 LayoutConfig 實(shí)例的默認(rèn)構(gòu)造函數(shù)。 |
| LayoutConfig(int width, int height) | 用于指定表格布局的寬度和高度的構(gòu)造函數(shù)。 |
| LayoutConfig(ComponentContainer.LayoutConfig params) | 用于復(fù)制 ComponentContainer.LayoutConfig 實(shí)例的構(gòu)造函數(shù)。 |
| LayoutConfig(TableLayout.LayoutConfig source) | 用于復(fù)制 LayoutConfig 實(shí)例的行和列規(guī)范的構(gòu)造函數(shù)。 |
| LayoutConfig(TableLayout.Specification rowSpec, TableLayout.Specification columnSpec) | 用于在表格布局中創(chuàng)建行和列規(guī)范的構(gòu)造函數(shù)。 |
| LayoutConfig(Context context, AttrSet attrSet) | 用于根據(jù)上下文和屬性集創(chuàng)建 LayoutConfig 實(shí)例的構(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ì)信息
columnSpec
public TableLayout.Specification columnSpec
指示表格布局中的列規(guī)范。
Since:
1
rowSpec
public TableLayout.Specification rowSpec
指示表格布局中的行規(guī)范。
Since:
1
構(gòu)造函數(shù)詳細(xì)信息
LayoutConfig
public LayoutConfig()
用于創(chuàng)建 LayoutConfig 實(shí)例的默認(rèn)構(gòu)造函數(shù)。
Since:
3
LayoutConfig
public LayoutConfig(Context context, AttrSet attrSet)
用于根據(jù)上下文和屬性集創(chuàng)建 LayoutConfig 實(shí)例的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| context | 指示應(yīng)用程序上下文。 |
| attrSet | 指示要使用的屬性集。 |
Since:
3
LayoutConfig
public LayoutConfig(TableLayout.Specification rowSpec, TableLayout.Specification columnSpec)
用于在表格布局中創(chuàng)建行和列規(guī)范的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| rowSpec | 指示表格布局中的行規(guī)范。 |
| columnSpec | 指示表格布局中的列規(guī)范。 |
Since:
3
LayoutConfig
public LayoutConfig(int width, int height)
用于指定表格布局的寬度和高度的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| width | 表示表格布局的寬度,不能小于0。 |
| height | 表示表格布局的高度,不能小于0。 |
Since:
3
LayoutConfig
public LayoutConfig(TableLayout.LayoutConfig source)
用于復(fù)制 LayoutConfig 實(shí)例的行和列規(guī)范的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| source | 指示要復(fù)制的表格布局。 |
Since:
3
LayoutConfig
public LayoutConfig(ComponentContainer.LayoutConfig params)
用于復(fù)制 ComponentContainer.LayoutConfig 實(shí)例的構(gòu)造函數(shù)。
該方法調(diào)用父類ComponentContainer中同名的方法。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| params | 指示要復(fù)制的布局參數(shù)。 |
Since:
3
文章名稱:創(chuàng)新互聯(lián)鴻蒙OS教程:鴻蒙OSTableLayout.LayoutConfig
網(wǎng)站地址:http://www.dlmjj.cn/article/dpgoihh.html


咨詢
建站咨詢
