鴻蒙OS SlideDrawer.LayoutConfig

2022-09-30 11:25 更新

SlideDrawer.LayoutConfig

java.lang.Object

|---ohos.agp.components.ComponentContainer.LayoutConfig

|---|---ohos.agp.components.SlideDrawer.LayoutConfig

public static class SlideDrawer.LayoutConfig
extends ComponentContainer.LayoutConfig

配置 SlideDrawer 的布局參數(shù),包括寬度、高度、邊距、SlideDirection 和 DisplayMode。

Since:

5

字段摘要

修飾符和類(lèi)型 字段 描述
SlideDrawer.SlideDirection direction 指示方向值。
從類(lèi) 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ù),其中已為 MATCH_CONTENT 設(shè)置了默認(rèn)寬度和高度。
LayoutConfig(int width, int height) 用于創(chuàng)建具有指定布局寬度和高度的 LayoutConfig 實(shí)例的構(gòu)造函數(shù)。
LayoutConfig(int width, int height, SlideDrawer.SlideDirection direction) 用于創(chuàng)建具有布局的指定寬度、高度和對(duì)齊參數(shù)的 LayoutConfig 實(shí)例的構(gòu)造函數(shù)。
LayoutConfig(ComponentContainer.LayoutConfig source) 用于使用源布局的參數(shù)(寬度、高度和邊距)創(chuàng)建 LayoutConfig 實(shí)例的構(gòu)造函數(shù)。
LayoutConfig(SlideDrawer.LayoutConfig source) 一個(gè)構(gòu)造函數(shù),用于使用源布局的參數(shù)(寬度、高度、邊距、SlideDirection 和 DisplayMode)創(chuàng)建 LayoutConfig 實(shí)例。
LayoutConfig(Context context, AttrSet attrSet) 用于根據(jù)上下文和屬性集創(chuàng)建 LayoutConfig 實(shí)例的構(gòu)造函數(shù)。

方法總結(jié)

從類(lèi) 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
從類(lèi) java.lang.Object 繼承的方法
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

字段詳細(xì)信息

direction

public SlideDrawer.SlideDirection direction

指示方向值。

Since:

5

構(gòu)造函數(shù)詳細(xì)信息

LayoutConfig

public LayoutConfig()

用于創(chuàng)建 LayoutConfig 實(shí)例的默認(rèn)構(gòu)造函數(shù),其中已為 MATCH_CONTENT 設(shè)置了默認(rèn)寬度和高度。

Since:

5

LayoutConfig

public LayoutConfig(Context context, AttrSet attrSet)

用于根據(jù)上下文和屬性集創(chuàng)建 LayoutConfig 實(shí)例的構(gòu)造函數(shù)。

參數(shù):

參數(shù)名稱(chēng) 參數(shù)描述
context 指示應(yīng)用程序上下文。
attrSet 指示要使用的屬性集。

Since:

5

LayoutConfig

public LayoutConfig(int width, int height)

用于創(chuàng)建具有指定布局寬度和高度的 LayoutConfig 實(shí)例的構(gòu)造函數(shù)。

參數(shù):

參數(shù)名稱(chēng) 參數(shù)描述
width 表示寬度,可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。
height 表示高度,可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。

Since:

5

LayoutConfig

public LayoutConfig(int width, int height, SlideDrawer.SlideDirection direction)

用于創(chuàng)建具有布局的指定寬度、高度和對(duì)齊參數(shù)的 LayoutConfig 實(shí)例的構(gòu)造函數(shù)。

參數(shù):

參數(shù)名稱(chēng) 參數(shù)描述
width 表示寬度,可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。
height 表示高度,可以是 ComponentContainer.LayoutConfig.MATCH_PARENT 或 ComponentContainer.LayoutConfig.MATCH_CONTENT。
direction 指示 SlideDirection 值。

Since:

5

LayoutConfig

public LayoutConfig(SlideDrawer.LayoutConfig source)

一個(gè)構(gòu)造函數(shù),用于使用源布局的參數(shù)(寬度、高度、邊距、SlideDirection 和 DisplayMode)創(chuàng)建 LayoutConfig 實(shí)例。

參數(shù):

參數(shù)名稱(chēng) 參數(shù)描述
source 表示源布局的參數(shù)。

Since:

5

LayoutConfig

public LayoutConfig(ComponentContainer.LayoutConfig source)

用于使用源布局的參數(shù)(寬度、高度和邊距)創(chuàng)建 LayoutConfig 實(shí)例的構(gòu)造函數(shù)。

參數(shù):

參數(shù)名稱(chēng) 參數(shù)描述
source 表示源布局的參數(shù)。

Since:

5

以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)