mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-19 14:23:57 +00:00
fix: measure view on return to view
This commit is contained in:
@@ -135,7 +135,7 @@ fun logger(e: Any?, print: Boolean = true) {
|
||||
}
|
||||
|
||||
|
||||
fun initActivity(a: Activity) {
|
||||
fun initActivityTheme(a: Activity) {
|
||||
val window = a.window
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
val darkMode = PrefManager.getVal<Int>(PrefName.DarkMode)
|
||||
|
||||
@@ -209,7 +209,7 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
|
||||
binding.root.doOnAttach {
|
||||
initActivity(this)
|
||||
initActivityTheme(this)
|
||||
selectedOption = if (fragment != null) {
|
||||
when (fragment) {
|
||||
AnimeFragment::class.java.name -> 0
|
||||
@@ -359,6 +359,10 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
initActivityTheme(this)
|
||||
binding.includedNavbar.navbarContainer.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
bottomMargin = navBarHeight
|
||||
}
|
||||
window.navigationBarColor = getColor(android.R.color.transparent)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user