The Android Developer Challenge is back! Submit your idea before December 2.

TrustedWebActivityDisplayMode.ImmersiveMode

public static class TrustedWebActivityDisplayMode.ImmersiveMode
extends Object implements TrustedWebActivityDisplayMode

java.lang.Object
   ↳ androidx.browser.trusted.TrustedWebActivityDisplayMode.ImmersiveMode


Immersive mode: both the browser controls and the system UI (status bar, navigation bar) is hidden while the user is on a verified origin. See https://developer.android.com/training/system-ui/immersive Using this mode is different from using the JavaScript Fullscreen API in that the immersive mode will be entered immediately, before the page has loaded. If the app uses a splash screen, it will be displayed in immersive mode. It is not recommended to use both this API and the JavaScript API simultaneously.

Summary

Constants

String KEY_CUTOUT_MODE

Bundle key for layoutInDisplayCutoutMode().

String KEY_STICKY

Bundle key for isSticky().

Inherited constants

Public constructors

TrustedWebActivityDisplayMode.ImmersiveMode(boolean isSticky, int layoutInDisplayCutoutMode)

Constructor.

Public methods

boolean isSticky()

Returns whether sticky immersive mode is enabled.

int layoutInDisplayCutoutMode()

Returns the cutout mode.

Bundle toBundle()

Packs the object into a Bundle.

Inherited methods

Constants

KEY_CUTOUT_MODE

public static final String KEY_CUTOUT_MODE

Bundle key for layoutInDisplayCutoutMode().

Constant Value: "androidx.browser.trusted.displaymode.KEY_CUTOUT_MODE"

KEY_STICKY

public static final String KEY_STICKY

Bundle key for isSticky().

Constant Value: "androidx.browser.trusted.displaymode.KEY_STICKY"

Public constructors

TrustedWebActivityDisplayMode.ImmersiveMode

public TrustedWebActivityDisplayMode.ImmersiveMode (boolean isSticky, 
                int layoutInDisplayCutoutMode)

Constructor.

Parameters
isSticky boolean: Whether the Trusted Web Activity should be in sticky immersive mode, see https://developer.android.com/training/system-ui/immersive#sticky-immersive

layoutInDisplayCutoutMode int: The constant defining how to deal with display cutouts. See WindowManager.LayoutParams.layoutInDisplayCutoutMode and https://developer.android.com/guide/topics/display-cutout

Public methods

isSticky

public boolean isSticky ()

Returns whether sticky immersive mode is enabled.

Returns
boolean

layoutInDisplayCutoutMode

public int layoutInDisplayCutoutMode ()

Returns the cutout mode.

Returns
int

toBundle

public Bundle toBundle ()

Packs the object into a Bundle.

Returns
Bundle