Class SystemUiDelegate
java.lang.Object
com.jwplayer.pub.api.fullscreen.delegates.SystemUiDelegate
Responsible for hiding and showing the System UI (Status Bar, Navigation Bar, etc.) during fullscreen
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSystemUiDelegate
(Activity activity, Lifecycle lifecycle, Handler handler, View decorView) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doSystemUiVisibility
(boolean fullscreen) Handle System UI changes.void
onStateChanged
(LifecycleOwner source, Lifecycle.Event event) void
setFullscreen
(boolean fullscreen) void
setUseFullscreenLayoutFlags
(boolean useFullscreenLayoutFlags) Determines whether View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION flags are used during fullscreen.
-
Field Details
-
mDecorView
protected View mDecorViewDecorView for the current Activity.
-
-
Constructor Details
-
SystemUiDelegate
public SystemUiDelegate(Activity activity, Lifecycle lifecycle, Handler handler, View decorView)
-
-
Method Details
-
setFullscreen
public void setFullscreen(boolean fullscreen) -
onStateChanged
public void onStateChanged(LifecycleOwner source, Lifecycle.Event event) -
setUseFullscreenLayoutFlags
public void setUseFullscreenLayoutFlags(boolean useFullscreenLayoutFlags) Determines whether View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION flags are used during fullscreen.These flags create an issue on Android 4.1, 4.2, and 4.3 devices when using the SupportActionBar, set this to false to disable using these flags.
-
doSystemUiVisibility
protected void doSystemUiVisibility(boolean fullscreen) Handle System UI changes.Default behavior is to hide the system UI when fullscreen == true and show it when fullscreen == false.
- Parameters:
fullscreen
- True when entering fullscreen.
-