mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-14 21:18:56 +01:00
Remove toolbar snapping
This commit is contained in:
@@ -98,15 +98,7 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
binding.appbar.applyInsetter {
|
||||
type(navigationBars = true, statusBars = true) {
|
||||
padding(left = true, right = true)
|
||||
}
|
||||
type(statusBars = true) {
|
||||
margin(top = true)
|
||||
}
|
||||
}
|
||||
binding.bottomNav.applyInsetter {
|
||||
type(navigationBars = true) {
|
||||
padding()
|
||||
padding(left = true, top = true, right = true)
|
||||
}
|
||||
}
|
||||
binding.rootFab.applyInsetter {
|
||||
@@ -114,6 +106,11 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
||||
margin()
|
||||
}
|
||||
}
|
||||
binding.bottomNav.applyInsetter {
|
||||
type(navigationBars = true) {
|
||||
padding()
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure navigation bar is on bottom before we modify it
|
||||
ViewCompat.setOnApplyWindowInsetsListener(binding.root) { _, insets ->
|
||||
@@ -124,7 +121,7 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
||||
Color.TRANSPARENT
|
||||
} else {
|
||||
// Set navbar scrim 70% of navigationBarColor
|
||||
getResourceColor(android.R.attr.navigationBarColor, .7F)
|
||||
getResourceColor(android.R.attr.navigationBarColor, 0.7F)
|
||||
}
|
||||
}
|
||||
insets
|
||||
|
||||
Reference in New Issue
Block a user