
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
                本文标题:创新互联鸿蒙OS教程:鸿蒙OSTableLayout.LayoutConfig
                
                新闻来源:http://www.csdahua.cn/qtweb/news4/326604.html
            
网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网