共用方式為


Activity.SetTranslucent(Boolean) Method

Definition

Convert an activity, which particularly with android.R.attr#windowIsTranslucent or android.R.attr#windowIsFloating attribute, to a fullscreen opaque activity, or convert it from opaque back to translucent.

[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

Parameters

translucent
Boolean

true convert from opaque to translucent. false convert from translucent to opaque.

Returns

The result of setting translucency. Return true if set successfully, false otherwise.

Attributes

Remarks

Convert an activity, which particularly with android.R.attr#windowIsTranslucent or android.R.attr#windowIsFloating attribute, to a fullscreen opaque activity, or convert it from opaque back to translucent.

Java documentation for android.app.Activity.setTranslucent(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to