Activity.SetTranslucent(Boolean) 方法

定义

将活动(尤其是具有 android.R.attr#windowIsTranslucent 或属性) android.R.attr#windowIsFloating 转换为全屏不透明活动,或将其从不透明转换回半透明。

[Android.Runtime.Register("setTranslucent", "(Z)Z", "GetSetTranslucent_ZHandler", ApiSince=30)]
public virtual bool SetTranslucent(bool translucent);
[<Android.Runtime.Register("setTranslucent", "(Z)Z", "GetSetTranslucent_ZHandler", ApiSince=30)>]
abstract member SetTranslucent : bool -> bool
override this.SetTranslucent : bool -> bool

参数

translucent
Boolean

true 从不透明转换为半透明。 false 从半透明转换为不透明。

返回

设置半透明性的结果。 如果成功设置,则返回 true ; false 否则返回。

属性

注解

将活动(尤其是具有 android.R.attr#windowIsTranslucent 或属性) android.R.attr#windowIsFloating 转换为全屏不透明活动,或将其从不透明转换回半透明。

Java文档android.app.Activity.setTranslucent(boolean)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于