mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Use dark navigation bar in dark theme
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package org.isoron.uhabits.activities
|
package org.isoron.uhabits.activities
|
||||||
|
|
||||||
|
import android.support.v4.content.*
|
||||||
import org.isoron.androidbase.activities.*
|
import org.isoron.androidbase.activities.*
|
||||||
import org.isoron.uhabits.*
|
import org.isoron.uhabits.*
|
||||||
import org.isoron.uhabits.core.preferences.*
|
import org.isoron.uhabits.core.preferences.*
|
||||||
@@ -34,6 +35,8 @@ class AndroidThemeSwitcher
|
|||||||
|
|
||||||
override fun applyDarkTheme() {
|
override fun applyDarkTheme() {
|
||||||
activity.setTheme(R.style.AppBaseThemeDark)
|
activity.setTheme(R.style.AppBaseThemeDark)
|
||||||
|
activity.window.navigationBarColor =
|
||||||
|
ContextCompat.getColor(activity, R.color.grey_900)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun applyLightTheme() {
|
override fun applyLightTheme() {
|
||||||
@@ -42,5 +45,7 @@ class AndroidThemeSwitcher
|
|||||||
|
|
||||||
override fun applyPureBlackTheme() {
|
override fun applyPureBlackTheme() {
|
||||||
activity.setTheme(R.style.AppBaseThemeDark_PureBlack)
|
activity.setTheme(R.style.AppBaseThemeDark_PureBlack)
|
||||||
|
activity.window.navigationBarColor =
|
||||||
|
ContextCompat.getColor(activity, R.color.black)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user