次の方法で共有


Drawable.SetVisible(Boolean, Boolean) Method

Definition

Set whether this Drawable is visible.

[Android.Runtime.Register("setVisible", "(ZZ)Z", "GetSetVisible_ZZHandler")]
public virtual bool SetVisible (bool visible, bool restart);
[<Android.Runtime.Register("setVisible", "(ZZ)Z", "GetSetVisible_ZZHandler")>]
abstract member SetVisible : bool * bool -> bool
override this.SetVisible : bool * bool -> bool

Parameters

visible
Boolean

Set to true if visible, false if not.

restart
Boolean

You can supply true here to force the drawable to behave as if it has just become visible, even if it had last been set visible. Used for example to force animations to restart.

Returns

boolean Returns true if the new visibility is different than its previous state.

Attributes

Remarks

Set whether this Drawable is visible. This generally does not impact the Drawable's behavior, but is a hint that can be used by some Drawables, for example, to decide whether run animations.

Java documentation for android.graphics.drawable.Drawable.setVisible(boolean, 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