java.lang.Object
|---ohos.agp.components.ComponentContainer.LayoutConfig
|---|---ohos.agp.components.DirectionalLayout.LayoutConfig
public static class DirectionalLayout.LayoutConfig
extends ComponentContainer.LayoutConfig
指定子控件的布局参数。
修饰符和类型 | 字段 | 描述 |
---|---|---|
int | alignment | 表示子组件的对齐方式。 |
static int | UNSPECIFIED_ALIGNMENT | 表示尚未设置的对齐值。 |
static float | UNSPECIFIED_WEIGHT | 表示尚未设置的权重。 |
float | weight | 表示子组件的权重。 |
从类 ohos.agp.components.ComponentContainer.LayoutConfig 继承的字段 |
---|
height, MATCH_CONTENT, MATCH_PARENT, width |
构造函数 | 描述 |
---|---|
LayoutConfig() | 默认构造函数用于创建 LayoutConfig 实例,其宽度和高度默认设置为 ComponentContainer.LayoutConfig#MATCH_CONTENT。 |
LayoutConfig(int width, int height) | 用于根据指定的宽度和高度创建 LayoutConfig 实例的构造函数。 |
LayoutConfig(int width, int height, int alignment, float weight) | 用于根据指定的宽度、高度、对齐方式和权重创建 LayoutConfig 实例的构造函数。 |
LayoutConfig(ComponentContainer.LayoutConfig source) | 用于根据源布局的宽度和高度设置布局参数的构造函数。 |
LayoutConfig(DirectionalLayout.LayoutConfig source) | 用于根据源布局的宽度、高度、边距、对齐方式和粗细设置布局参数的构造函数。 |
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 static final int UNSPECIFIED_ALIGNMENT
表示尚未设置的对齐值。
public static final float UNSPECIFIED_WEIGHT
表示尚未设置的权重。
public int alignment
表示子组件的对齐方式。
public float weight
表示子组件的权重。
public LayoutConfig()
默认构造函数用于创建 LayoutConfig 实例,其宽度和高度默认设置为 ComponentContainer.LayoutConfig#MATCH_CONTENT。
public LayoutConfig(Context context, AttrSet attrSet)
用于根据上下文和属性集创建 LayoutConfig 实例的构造函数。
参数:
参数名称 | 参数描述 |
---|---|
context | 指示应用程序上下文。 |
attrSet | 指示要使用的属性集。 |
public LayoutConfig(int width, int height)
用于根据指定的宽度和高度创建 LayoutConfig 实例的构造函数。
参数:
参数名称 | 参数描述 |
---|---|
width | 指定宽度,可以是特定值,也可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。 |
height | 指定高度,可以是特定值,也可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。 |
public LayoutConfig(int width, int height, int alignment, float weight)
用于根据指定的宽度、高度、对齐方式和权重创建 LayoutConfig 实例的构造函数。
参数:
参数名称 | 参数描述 |
---|---|
width | 指定宽度,可以是特定值,也可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。 |
height | 指定高度,可以是特定值,也可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。 |
alignment | 指定对齐值。 |
weight | 指定权重值。 |
public LayoutConfig(ComponentContainer.LayoutConfig source)
用于根据源布局的宽度和高度设置布局参数的构造函数。 边距、对齐方式和权重设置为默认值。
参数:
参数名称 | 参数描述 |
---|---|
source | 指定源布局的参数。 |
public LayoutConfig(DirectionalLayout.LayoutConfig source)
用于根据源布局的宽度、高度、边距、对齐方式和粗细设置布局参数的构造函数。
参数:
参数名称 | 参数描述 |
---|---|
source | 指定源布局的参数。 |
PageSlider.ReboundEffectParamsjava.lang.Object |---ohos.agp.components.PageSlider.ReboundEffectParamspublic static class...
SlideDrawerjava.lang.Object |---ohos.agp.components.Component |---|---ohos.agp.components.ComponentContainer |---|---|--...
DisplayNotchjava.lang.Object |---ohos.agp.window.service.DisplayNotchpublic class DisplayNotchextends Object表示一个显示...
云开发控制台云开发提供了一个控制台用于可视化管理云资源。控制台包含以下几大模块。概览:查看云资源的总体使用情况用户管理:...
MapContext.removeCustomLayer(Object object)基础库 2.12.0 开始支持,低版本需做兼容处理。移除个性化图层。参数Object object...
小程序卡券打通小程序卡券打通1 打通主要支持特性支持在小程序中领取/查看/使用公众号AppId创建的会员卡、票、券(含通用卡)。...
BackgroundAudioManagerBackgroundAudioManager 实例,可通过wx.getBackgroundAudioManager获取。属性string src音频的数据源(2...
EditorContext基础库 2.7.0 开始支持,低版本需做兼容处理。EditorContext 实例,可通过wx.createSelectorQuery获取。EditorCont...
wx.getLocation(OBJECT)获取当前的地理位置、速度。当用户离开小程序后,此接口无法调用;当用户点击“显示在聊天顶部”时,此接...
wx.scanCode(Object object)调起客户端扫码界面进行扫码参数Object object属性类型默认值必填说明最低版本onlyFromCameraboolean...