Udostępnij za pośrednictwem


Activity.SetVisible(Boolean) Method

Definition

Control whether this activity's main window is visible.

[Android.Runtime.Register("setVisible", "(Z)V", "GetSetVisible_ZHandler")]
public virtual void SetVisible (bool visible);
[<Android.Runtime.Register("setVisible", "(Z)V", "GetSetVisible_ZHandler")>]
abstract member SetVisible : bool -> unit
override this.SetVisible : bool -> unit

Parameters

visible
Boolean
Attributes

Remarks

Control whether this activity's main window is visible. This is intended only for the special case of an activity that is not going to show a UI itself, but can't just finish prior to onResume() because it needs to wait for a service binding or such. Setting this to false allows you to prevent your UI from being shown during that time.

The default value for this is taken from the android.R.attr#windowNoDisplay attribute of the activity's theme.

Java documentation for android.app.Activity.setVisible(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