#1176 - Fix invisible navigation bar icons on API 26

This commit is contained in:
Moez Bhatti
2018-06-17 14:59:38 -04:00
parent 126c959015
commit 1ce5846f76
@@ -73,8 +73,7 @@ abstract class QkThemedActivity : QkActivity() {
// When certain preferences change, we need to recreate the activity // When certain preferences change, we need to recreate the activity
Observable.merge( Observable.merge(
listOf(prefs.night, prefs.black, prefs.textSize, prefs.systemFont) listOf(prefs.night, prefs.black, prefs.textSize, prefs.systemFont).map { it.asObservable().skip(1) })
.map { it.asObservable().skip(1) })
.autoDisposable(scope()) .autoDisposable(scope())
.subscribe { recreate() } .subscribe { recreate() }
@@ -89,7 +88,9 @@ abstract class QkThemedActivity : QkActivity() {
} }
// Some devices don't let you modify android.R.attr.navigationBarColor // Some devices don't let you modify android.R.attr.navigationBarColor
if (Build.VERSION.SDK_INT >= 27) window.navigationBarColor = resolveThemeColor(android.R.attr.windowBackground) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
window.navigationBarColor = resolveThemeColor(android.R.attr.windowBackground)
}
// Set the color for the overflow and navigation icon // Set the color for the overflow and navigation icon
val textTertiary = resolveThemeColor(android.R.attr.textColorTertiary) val textTertiary = resolveThemeColor(android.R.attr.textColorTertiary)