mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
Use a lower elevation for the navigation bar
This commit is contained in:
parent
cf5ef1292f
commit
c01cee3f83
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user