Skip to content

Commit 23c70bc

Browse files
CopilotGoooler
andcommitted
Fix unresolved colorPrimary and colorControlNormal for Material 1.13.0
Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
1 parent f16b291 commit 23c70bc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ 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)
84+
binding.colorClashStarted = context.resolveThemedColor(android.R.attr.colorPrimary)
8585
binding.colorClashStopped = context.resolveThemedColor(R.attr.colorClashStopped)
8686
}
8787

design/src/main/java/com/github/kr328/clash/design/adapter/PopupListAdapter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ class PopupListAdapter(
1515
private val texts: List<CharSequence>,
1616
private val selected: Int,
1717
) : BaseAdapter() {
18-
private val colorPrimary = context.resolveThemedColor(com.google.android.material.R.attr.colorPrimary)
18+
private val colorPrimary = context.resolveThemedColor(android.R.attr.colorPrimary)
1919
private val colorOnPrimary = context.resolveThemedColor(com.google.android.material.R.attr.colorOnPrimary)
20-
private val colorControlNormal = context.resolveThemedColor(com.google.android.material.R.attr.colorControlNormal)
20+
private val colorControlNormal = context.resolveThemedColor(android.R.attr.colorControlNormal)
2121

2222
override fun getCount(): Int {
2323
return texts.size

design/src/main/java/com/github/kr328/clash/design/component/ProxyViewConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ProxyViewConfig(val context: Context, var proxyLine: Int) {
1414
context.resolveThemedResourceId(android.R.attr.selectableItemBackground)
1515

1616
val selectedControl = context.resolveThemedColor(com.google.android.material.R.attr.colorOnPrimary)
17-
val selectedBackground = context.resolveThemedColor(com.google.android.material.R.attr.colorPrimary)
17+
val selectedBackground = context.resolveThemedColor(android.R.attr.colorPrimary)
1818

1919
val unselectedControl = context.resolveThemedColor(com.google.android.material.R.attr.colorOnSurface)
2020
val unselectedBackground: Int

0 commit comments

Comments
 (0)