Activity.SetTranslucent(Boolean) 方法

定义

将活动(尤其是具有 android.R.attr#windowIsTranslucentandroid.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#windowIsTranslucentandroid.R.attr#windowIsFloating 属性的活动)转换为全屏不透明活动,或将其从不透明转换回半透明。

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

此页面的部分内容是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的术语使用。

适用于