十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

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。 前者表示组件容器中的边距布局配置,后者表示行和列规范。
Since:
3
| 修饰符和类型 | 字段 | 描述 | 
|---|---|---|
| TableLayout.Specification | columnSpec | 指示表格布局中的列规范。 | 
| TableLayout.Specification | rowSpec | 指示表格布局中的行规范。 | 
| 从类 ohos.agp.components.ComponentContainer.LayoutConfig 继承的字段 | 
|---|
| height, MATCH_CONTENT, MATCH_PARENT, width | 
| 构造函数 | 描述 | 
|---|---|
| LayoutConfig() | 用于创建 LayoutConfig 实例的默认构造函数。 | 
| LayoutConfig(int width, int height) | 用于指定表格布局的宽度和高度的构造函数。 | 
| LayoutConfig(ComponentContainer.LayoutConfig params) | 用于复制 ComponentContainer.LayoutConfig 实例的构造函数。 | 
| LayoutConfig(TableLayout.LayoutConfig source) | 用于复制 LayoutConfig 实例的行和列规范的构造函数。 | 
| LayoutConfig(TableLayout.Specification rowSpec, TableLayout.Specification columnSpec) | 用于在表格布局中创建行和列规范的构造函数。 | 
| LayoutConfig(Context context, AttrSet attrSet) | 用于根据上下文和属性集创建 LayoutConfig 实例的构造函数。 | 
| 从类 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 | 
public TableLayout.Specification columnSpec
指示表格布局中的列规范。
Since:
1
public TableLayout.Specification rowSpec
指示表格布局中的行规范。
Since:
1
public LayoutConfig()
用于创建 LayoutConfig 实例的默认构造函数。
Since:
3
public LayoutConfig(Context context, AttrSet attrSet)
用于根据上下文和属性集创建 LayoutConfig 实例的构造函数。
参数:
| 参数名称 | 参数描述 | 
|---|---|
| context | 指示应用程序上下文。 | 
| attrSet | 指示要使用的属性集。 | 
Since:
3
public LayoutConfig(TableLayout.Specification rowSpec, TableLayout.Specification columnSpec)
用于在表格布局中创建行和列规范的构造函数。
参数:
| 参数名称 | 参数描述 | 
|---|---|
| rowSpec | 指示表格布局中的行规范。 | 
| columnSpec | 指示表格布局中的列规范。 | 
Since:
3
public LayoutConfig(int width, int height)
用于指定表格布局的宽度和高度的构造函数。
参数:
| 参数名称 | 参数描述 | 
|---|---|
| width | 表示表格布局的宽度,不能小于0。 | 
| height | 表示表格布局的高度,不能小于0。 | 
Since:
3
public LayoutConfig(TableLayout.LayoutConfig source)
用于复制 LayoutConfig 实例的行和列规范的构造函数。
参数:
| 参数名称 | 参数描述 | 
|---|---|
| source | 指示要复制的表格布局。 | 
Since:
3
public LayoutConfig(ComponentContainer.LayoutConfig params)
用于复制 ComponentContainer.LayoutConfig 实例的构造函数。
该方法调用父类ComponentContainer中同名的方法。
参数:
| 参数名称 | 参数描述 | 
|---|---|
| params | 指示要复制的布局参数。 | 
Since:
3