Partager via


SurfaceView.SetSecure(Boolean) Method

Definition

Control whether the surface view's content should be treated as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.

[Android.Runtime.Register("setSecure", "(Z)V", "GetSetSecure_ZHandler")]
public virtual void SetSecure (bool isSecure);
[<Android.Runtime.Register("setSecure", "(Z)V", "GetSetSecure_ZHandler")>]
abstract member SetSecure : bool -> unit
override this.SetSecure : bool -> unit

Parameters

isSecure
Boolean

True if the surface view is secure.

Attributes

Remarks

Control whether the surface view's content should be treated as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.

Note that this must be set before the surface view's containing window is attached to the window manager.

See android.view.Display#FLAG_SECURE for details.

Java documentation for android.view.SurfaceView.setSecure(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