Skip to content

Commit

Permalink
Merge pull request #112 from CarlosOlivo/fix-nav-ui-horizontal-overlap
Browse files Browse the repository at this point in the history
Fix UI overlap by applying also horizontal insets
  • Loading branch information
Maxr1998 authored Sep 10, 2020
2 parents 5a52096 + 14dedc5 commit b00964e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/src/main/java/org/jellyfin/mobile/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ class MainActivity : AppCompatActivity(), WebViewController {

// Handle window insets
setStableLayoutFlags()
ViewCompat.setOnApplyWindowInsetsListener(rootView) { v, insets ->
ViewCompat.setOnApplyWindowInsetsListener(rootView) { _, insets ->
val layoutParams = webView.layoutParams as CoordinatorLayout.LayoutParams
layoutParams.updateMargins(top = insets.systemWindowInsetTop, bottom = insets.systemWindowInsetBottom)

layoutParams.updateMargins(
left = insets.systemWindowInsetLeft,
top = insets.systemWindowInsetTop,
right = insets.systemWindowInsetRight,
bottom = insets.systemWindowInsetBottom
)
insets
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
Expand Down

0 comments on commit b00964e

Please sign in to comment.