帮助您使用 Intent 设置应用程序启动窗口的布局参数。
| 建设者 | 描述 | 
|---|---|
| LayoutParamsHelper(Intent intentLayout) | 
| 修饰符和类型 | 方法 | 描述 | 
|---|---|---|
| Ability.LayoutParamsHelper | setAlpha(float alpha) | 设置窗口的 Alpha。 | 
| Ability.LayoutParamsHelper | setDimAmount(float dimAmount) | 设置窗口后的暗淡量。 | 
| Ability.LayoutParamsHelper | setFlags(int 标志,int 掩码) | 设置窗口的标志。 | 
| Ability.LayoutParamsHelper | setGravity(int 引力) | 设置窗口的重力。 | 
| Ability.LayoutParamsHelper | setHeight](https://developer.harmonyos.com/en/docs/documentation/doc-references/ability_layoutparamshelper-0000001054119936#ZH-CN_TOPIC_0000001054119936__setHeight-int-)(int 高度) | 设置窗口的高度。 | 
| Ability.LayoutParamsHelper | setWidth(int 宽度) | 设置窗口的宽度。 | 
| Ability.LayoutParamsHelper | setX(int x) | 设置窗口的X坐标。 | 
| Ability.LayoutParamsHelper | setY(int y) | 设置窗口的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)
设置窗口的 X 坐标。
参数:
| 参数名称 | 参数说明 | 
|---|---|
| X | 指示在 WindowManager.LayoutConfig.x中设置的 X 坐标。 | 
返回值:
返回具有指定X坐标的 LayoutParamsHelper 对象。
public Ability.LayoutParamsHelper setY(int y)
设置窗口的Y坐标。
参数:
| 参数名称 | 参数说明 | 
|---|---|
| ÿ | 指示在 WindowManager.LayoutConfig.y中 设置的 Y 坐标。 | 
返回值:
返回具有指定 Y 坐标的 LayoutParamsHelper 对象。
public Ability.LayoutParamsHelper setWidth(int width)
设置窗口的宽度。
参数:
| 参数名称 | 参数说明 | 
|---|---|
| 宽度 | 指示在 WindowManager.LayoutConfig.width中 设置的宽度。 | 
返回值:
返回具有指定宽度的 LayoutParamsHelper 对象。
public Ability.LayoutParamsHelper setHeight(int height)
设置窗口的高度。
参数:
| 参数名称 | 参数说明 | 
|---|---|
| 高度 | 指示在 WindowManager.LayoutConfig.height中](/harmonyos/harmonyos-5a1w3cys.html)设置的高度。 | 
返回值:
返回具有指定高度的 LayoutParamsHelper 对象。
public Ability.LayoutParamsHelper setAlpha(float alpha)
设置窗口的 Alpha。
参数:
| 参数名称 | 参数说明 | 
|---|---|
| α | 指示在 WindowManager.LayoutConfig中设置的 Alpha 。 | 
返回值:
返回具有指定 Alpha 的 LayoutParamsHelper 对象。
public Ability.LayoutParamsHelper setDimAmount(float dimAmount)
设置窗口后的暗淡量。
参数:
| 参数名称 | 参数说明 | 
|---|---|
| dimAmount | 指示在 WindowManager.LayoutConfig.dim中 设置的暗淡数量。 | 
返回值:
返回具有指定数量的 dim 的 LayoutParamsHelper 对象。
public Ability.LayoutParamsHelper setFlags(int 标志,int mask)
设置窗口的标志。
参数:
| 参数名称 | 参数说明 | 
|---|---|
| 标志 | 指示在 WindowManager.LayoutConfig.flags中 设置的标志。 | 
| 面具 | 标志位掩码 | 
返回值:
返回带有指定标志的 LayoutParamsHelper 对象。
public Ability.LayoutParamsHelper setGravity(int 万有引力)
设置窗口的重力。
参数:
| 参数名称 | 参数说明 | 
|---|---|
| 重力 | 指示在 LayoutAlignment中设置的重力。 | 
返回值:
返回具有指定重力的 LayoutParamsHelper 对象。
© 2023 mianshi8.net MIT license
