mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
Merge pull request #2785 from Bnyro/master
Fix the different colors of navigation and bottom bar
This commit is contained in:
commit
e3ad011de6
@ -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, binding.bottomNav.elevation)
|
||||||
} 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