次の方法で共有


View.IsInEditMode Property

Definition

Indicates whether this View is currently in edit mode.

public virtual bool IsInEditMode { [Android.Runtime.Register("isInEditMode", "()Z", "GetIsInEditModeHandler")] get; }
[<get: Android.Runtime.Register("isInEditMode", "()Z", "GetIsInEditModeHandler")>]
member this.IsInEditMode : bool

Property Value

True if this View is in edit mode, false otherwise.

Attributes

Remarks

Indicates whether this View is currently in edit mode. A View is usually in edit mode when displayed within a developer tool. For instance, if this View is being drawn by a visual user interface builder, this method should return true.

Subclasses should check the return value of this method to provide different behaviors if their normal behavior might interfere with the host environment. For instance: the class spawns a thread in its constructor, the drawing code relies on device-specific features, etc.

This method is usually checked in the drawing code of custom widgets.

Java documentation for android.view.View.isInEditMode().

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