ISurfaceHolder.SetKeepScreenOn(Boolean) Method

Definition

Enable or disable option to keep the screen turned on while this surface is displayed.

[Android.Runtime.Register("setKeepScreenOn", "(Z)V", "GetSetKeepScreenOn_ZHandler:Android.Views.ISurfaceHolderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void SetKeepScreenOn (bool screenOn);
[<Android.Runtime.Register("setKeepScreenOn", "(Z)V", "GetSetKeepScreenOn_ZHandler:Android.Views.ISurfaceHolderInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member SetKeepScreenOn : bool -> unit

Parameters

screenOn
Boolean

Set to true to force the screen to stay on, false to allow it to turn off.

Attributes

Remarks

Enable or disable option to keep the screen turned on while this surface is displayed. The default is false, allowing it to turn off. This is safe to call from any thread.

Java documentation for android.view.SurfaceHolder.setKeepScreenOn(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