Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FullscreenHandler.kt #32

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* 🐛 Disable system gestures on the `SeekBar` component. ([#30](https://github.com/THEOplayer/android-ui/pull/30))
* 🐛 Fixed ad clickthrough not working. ([#33](https://github.com/THEOplayer/android-ui/pull/33))
* 🐛 Fixed UI not re-appearing after playing an ad. ([#33](https://github.com/THEOplayer/android-ui/pull/33))
* 🐛 Fixed exiting fullscreen disabling [edge-to-edge display](https://developer.android.com/develop/ui/views/layout/edge-to-edge-manually). ([#32](https://github.com/THEOplayer/android-ui/pull/32))

## v1.7.0 (2024-08-12)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ internal class FullscreenHandlerImpl(private val view: View) : FullscreenHandler
val window = activity.window

// Hide system bars
WindowCompat.setDecorFitsSystemWindows(window, false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I don't remember where I got this code from. 😅

It looks like this guide is the best resource at the moment, and it doesn't mention setDecorFitsSystemWindows at all. So I suppose it's not needed. 👍

WindowCompat.getInsetsController(window, view).let { controller ->
controller.hide(WindowInsetsCompat.Type.systemBars())
previousSystemBarsBehavior = controller.systemBarsBehavior
Expand Down Expand Up @@ -74,7 +73,6 @@ internal class FullscreenHandlerImpl(private val view: View) : FullscreenHandler
val window = activity.window

// Restore system bars
WindowCompat.setDecorFitsSystemWindows(window, true)
WindowCompat.getInsetsController(window, view).let { controller ->
controller.show(WindowInsetsCompat.Type.systemBars())
controller.systemBarsBehavior = previousSystemBarsBehavior
Expand Down