App lock icon does not go behind navigation bar in landscape mode
This commit is contained in:
@@ -225,6 +225,16 @@ class HomeActivity : AppCompatActivity() {
|
||||
insets
|
||||
}
|
||||
|
||||
// The app bar only pads for the status bar. In landscape the navigation bar (and any
|
||||
// cutout) sits at a side edge, and the toolbar's end icons — the lock button — would
|
||||
// draw underneath it, out of reach.
|
||||
ViewCompat.setOnApplyWindowInsetsListener(binding.toolbar) { v, insets ->
|
||||
val sides = insets.getInsets(
|
||||
WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout())
|
||||
v.updatePadding(left = sides.left, right = sides.right)
|
||||
insets
|
||||
}
|
||||
|
||||
binding.bottomNavigation.setOnItemSelectedListener { item ->
|
||||
if (suppressBottomNavCallback) return@setOnItemSelectedListener true
|
||||
val frag = when (item.itemId) {
|
||||
|
||||
Reference in New Issue
Block a user