Use a lower elevation for the navigation bar

This commit is contained in:
Bnyro 2023-01-21 11:06:16 +01:00
parent cf5ef1292f
commit c01cee3f83

View File

@ -97,7 +97,7 @@ class MainActivity : BaseActivity() {
// sets the navigation bar color to the previously calculated color // sets the navigation bar color to the previously calculated color
window.navigationBarColor = if (binding.bottomNav.menu.size() > 0) { window.navigationBarColor = if (binding.bottomNav.menu.size() > 0) {
SurfaceColors.getColorForElevation(this, 10F) SurfaceColors.getColorForElevation(this, 9F)
} else { } else {
ThemeHelper.getThemeColor(this, android.R.attr.colorBackground) ThemeHelper.getThemeColor(this, android.R.attr.colorBackground)
} }
@ -120,7 +120,7 @@ class MainActivity : BaseActivity() {
val navHostFragment = val navHostFragment =
supportFragmentManager.findFragmentById(R.id.fragment) as NavHostFragment? supportFragmentManager.findFragmentById(R.id.fragment) as NavHostFragment?
// get the current fragment // get the current fragment
val fragment = navHostFragment?.childFragmentManager?.fragments?.get(0) val fragment = navHostFragment?.childFragmentManager?.fragments?.getOrNull(0)
tryScrollToTop(fragment?.requireView() as? ViewGroup) tryScrollToTop(fragment?.requireView() as? ViewGroup)
} }
} }