Skip to content

Commit c8fe5a5

Browse files
committed
adjust: card color
1 parent d137b8e commit c8fe5a5

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

app/src/main/java/com/github/kr328/clash/BaseActivity.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ abstract class BaseActivity<D : Design<*>> : AppCompatActivity(),
9898
DynamicColors.applyToActivityIfAvailable(this)
9999
}
100100
super.onCreate(savedInstanceState)
101-
// updateSystemBars(dayNightValue)
101+
updateSystemBars(dayNightValue)
102102
// Apply excludeFromRecents setting to all app tasks.
103103
checkNotNull(getSystemService<ActivityManager>()).appTasks.forEach { task ->
104104
task.setExcludeFromRecents(uiStore.hideFromRecents)
@@ -197,23 +197,23 @@ abstract class BaseActivity<D : Design<*>> : AppCompatActivity(),
197197
}
198198
}
199199

200-
// private fun updateSystemBars(currentDayNight: DayNight) {
201-
// window.isAllowForceDarkCompat = false
202-
// window.isSystemBarsTranslucentCompat = true
200+
private fun updateSystemBars(currentDayNight: DayNight) {
201+
window.isAllowForceDarkCompat = false
202+
window.isSystemBarsTranslucentCompat = true
203203

204-
// window.statusBarColor = resolveThemedColor(android.R.attr.statusBarColor)
205-
// window.navigationBarColor = resolveThemedColor(android.R.attr.navigationBarColor)
204+
window.statusBarColor = resolveThemedColor(android.R.attr.statusBarColor)
205+
window.navigationBarColor = resolveThemedColor(android.R.attr.navigationBarColor)
206206

207-
// if (Build.VERSION.SDK_INT >= 23) {
208-
// window.isLightStatusBarsCompat = resolveThemedBoolean(android.R.attr.windowLightStatusBar)
209-
// }
207+
if (Build.VERSION.SDK_INT >= 23) {
208+
window.isLightStatusBarsCompat = resolveThemedBoolean(android.R.attr.windowLightStatusBar)
209+
}
210210

211-
// if (Build.VERSION.SDK_INT >= 27) {
212-
// window.isLightNavigationBarCompat = resolveThemedBoolean(android.R.attr.windowLightNavigationBar)
213-
// }
211+
if (Build.VERSION.SDK_INT >= 27) {
212+
window.isLightNavigationBarCompat = resolveThemedBoolean(android.R.attr.windowLightNavigationBar)
213+
}
214214

215-
// this.dayNight = currentDayNight
216-
// }
215+
this.dayNight = currentDayNight
216+
}
217217

218218
private fun queryDayNight(config: Configuration = resources.configuration): DayNight {
219219
return when (uiStore.darkMode) {

design/src/main/java/com/github/kr328/clash/design/MainDesign.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ class MainDesign(context: Context) : Design<MainDesign.Request>(context) {
8181
init {
8282
binding.self = this
8383

84-
binding.colorClashStarted = context.resolveThemedColor(com.google.android.material.R.attr.colorPrimary)
85-
binding.colorClashStopped = context.resolveThemedColor(com.google.android.material.R.attr.colorPrimaryContainer)
84+
binding.colorClashStarted = context.resolveThemedColor(com.google.android.material.R.attr.colorPrimaryContainer)
85+
binding.colorClashStopped = context.resolveThemedColor(com.google.android.material.R.attr.colorSurfaceContainerHighest)
8686
}
8787

8888
fun request(request: Request) {

0 commit comments

Comments
 (0)