public class

TrustedWebActivityDisplayMode.ImmersiveMode

extends java.lang.Object

implements TrustedWebActivityDisplayMode

 java.lang.Object

↳androidx.browser.trusted.TrustedWebActivityDisplayMode.ImmersiveMode

Overview

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

Fields
public static final java.lang.StringKEY_CUTOUT_MODE

Bundle key for TrustedWebActivityDisplayMode.ImmersiveMode.layoutInDisplayCutoutMode().

public static final java.lang.StringKEY_STICKY

Bundle key for TrustedWebActivityDisplayMode.ImmersiveMode.isSticky().

Constructors
publicImmersiveMode(boolean isSticky, int layoutInDisplayCutoutMode)

Constructor.

Methods
public booleanisSticky()

Returns whether sticky immersive mode is enabled.

public intlayoutInDisplayCutoutMode()

Returns the cutout mode.

public BundletoBundle()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final java.lang.String KEY_STICKY

Bundle key for TrustedWebActivityDisplayMode.ImmersiveMode.isSticky().

public static final java.lang.String KEY_CUTOUT_MODE

Bundle key for TrustedWebActivityDisplayMode.ImmersiveMode.layoutInDisplayCutoutMode().

Constructors

public ImmersiveMode(boolean isSticky, int layoutInDisplayCutoutMode)

Constructor.

Parameters:

isSticky: Whether the Trusted Web Activity should be in sticky immersive mode, see https://developer.android.com/training/system-ui/immersive#sticky-immersive
layoutInDisplayCutoutMode: The constant defining how to deal with display cutouts. See and https://developer.android.com/guide/topics/display-cutout

Methods

public Bundle toBundle()

public boolean isSticky()

Returns whether sticky immersive mode is enabled.

public int layoutInDisplayCutoutMode()

Returns the cutout mode.