W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
幫助您使用 Intent 設(shè)置應(yīng)用程序啟動窗口的布局參數(shù)。
建設(shè)者 | 描述 |
---|---|
LayoutParamsHelper(Intent intentLayout) |
修飾符和類型 | 方法 | 描述 |
---|---|---|
Ability.LayoutParamsHelper | setAlpha(float alpha) | 設(shè)置窗口的 Alpha。 |
Ability.LayoutParamsHelper | setDimAmount(float dimAmount) | 設(shè)置窗口后的暗淡量。 |
Ability.LayoutParamsHelper | setFlags(int 標志,int 掩碼) | 設(shè)置窗口的標志。 |
Ability.LayoutParamsHelper | setGravity(int 引力) | 設(shè)置窗口的重力。 |
Ability.LayoutParamsHelper | setHeight](https://developer.harmonyos.com/en/docs/documentation/doc-references/ability_layoutparamshelper-0000001054119936#ZH-CN_TOPIC_0000001054119936__setHeight-int-)(int 高度) | 設(shè)置窗口的高度。 |
Ability.LayoutParamsHelper | setWidth(int 寬度) | 設(shè)置窗口的寬度。 |
Ability.LayoutParamsHelper | setX(int x) | 設(shè)置窗口的X坐標。 |
Ability.LayoutParamsHelper | setY(int y) | 設(shè)置窗口的Y坐標。 |
從類 java.lang 繼承的方法。object |
---|
clone,equals,finalize,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait |
public LayoutParamsHelper(Intent intentLayout)
public Ability.LayoutParamsHelper setX(int x)
設(shè)置窗口的 X 坐標。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
X | 指示在 WindowManager.LayoutConfig.x中設(shè)置的 X 坐標。 |
返回值:
返回具有指定X坐標的 LayoutParamsHelper 對象。
public Ability.LayoutParamsHelper setY(int y)
設(shè)置窗口的Y坐標。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
? | 指示在 WindowManager.LayoutConfig.y中 設(shè)置的 Y 坐標。 |
返回值:
返回具有指定 Y 坐標的 LayoutParamsHelper 對象。
public Ability.LayoutParamsHelper setWidth(int width)
設(shè)置窗口的寬度。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
寬度 | 指示在 WindowManager.LayoutConfig.width中 設(shè)置的寬度。 |
返回值:
返回具有指定寬度的 LayoutParamsHelper 對象。
public Ability.LayoutParamsHelper setHeight(int height)
設(shè)置窗口的高度。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
高度 | 指示在 WindowManager.LayoutConfig.height中](http://www.o2fo.com/harmonyos/harmonyos-5a1w3cys.html)設(shè)置的高度。 |
返回值:
返回具有指定高度的 LayoutParamsHelper 對象。
public Ability.LayoutParamsHelper setAlpha(float alpha)
設(shè)置窗口的 Alpha。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
α | 指示在 WindowManager.LayoutConfig中設(shè)置的 Alpha 。 |
返回值:
返回具有指定 Alpha 的 LayoutParamsHelper 對象。
public Ability.LayoutParamsHelper setDimAmount(float dimAmount)
設(shè)置窗口后的暗淡量。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
dimAmount | 指示在 WindowManager.LayoutConfig.dim中 設(shè)置的暗淡數(shù)量。 |
返回值:
返回具有指定數(shù)量的 dim 的 LayoutParamsHelper 對象。
public Ability.LayoutParamsHelper setFlags(int 標志,int mask)
設(shè)置窗口的標志。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
標志 | 指示在 WindowManager.LayoutConfig.flags中 設(shè)置的標志。 |
面具 | 標志位掩碼 |
返回值:
返回帶有指定標志的 LayoutParamsHelper 對象。
public Ability.LayoutParamsHelper setGravity(int 萬有引力)
設(shè)置窗口的重力。
參數(shù):
參數(shù)名稱 | 參數(shù)說明 |
---|---|
重力 | 指示在 LayoutAlignment中設(shè)置的重力。 |
返回值:
返回具有指定重力的 LayoutParamsHelper 對象。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: