feat: 统一应用文本颜色由主题控制,支持深色/普通模式自适应

主题改造(mymessagemanager):
  - values/styles.xml + values-night/styles.xml:6种风格x2模式共12个主题
    统一设置 android:textColorPrimary / textColorPrimary / android:textColor / colorTextColor
    指向 @color/text_color_primary
  - values/colors.xml:text_color_primary=#FF000000(普通模式黑色)
  - values-night/colors.xml:text_color_primary=#FF00FF00(深色模式绿色)
  - attrs.xml:声明 textColorPrimary 属性解决 AAPT2 编译错误

清除硬编码文本颜色(跨模块):
  - 移除 13 个布局文件中的 android:textColor 属性(libappbase/libaes/winboll/appbase)
  - 移除 3 个 Java 文件中的 setTextColor(Color.BLACK/white/gray) 调用
  - 移除 ComposeSMSActivity / CharsetRefuseEditDialog 中的自定义文本颜色
  - 移除 toast_custom_view.xml / view_tts_back.xml 中的 android:textColor

CompoundButton 文本颜色适配:
  - ConfirmSwitchView:initView 中读取主题 textColorPrimary 的 ColorStateList 并显式设置
  - activity_appsettings.xml:平台 Switch 替换为 ConfirmSwitchView
  - fragment_main.xml:Switch 添加 textColor=?android:attr/textColorPrimary
  - 10个 RadioButton + 4个 CheckBox 添加 textColor=?android:attr/textColorPrimary
This commit is contained in:
2026-05-09 10:02:44 +08:00
parent 99de6c05ba
commit 55c7f7d327
37 changed files with 201 additions and 134 deletions

View File

@@ -13,7 +13,6 @@
android:layout_height="wrap_content"
android:text="用户须知"
android:textSize="18sp"
android:textColor="@android:color/black"
android:textStyle="bold"
android:layout_marginBottom="16dp" />
@@ -28,8 +27,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="小米广告SDK隐私政策: "
android:textSize="14sp"
android:textColor="@android:color/darker_gray" />
android:textSize="14sp" />
<!-- 可点击链接用TextView承载通过代码设置蓝色+下划线) -->
<TextView
@@ -44,8 +42,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=",点击链接查看完整政策"
android:textSize="14sp"
android:textColor="@android:color/darker_gray" />
android:textSize="14sp" />
</LinearLayout>
<!-- 按钮容器(水平排列) -->

View File

@@ -11,7 +11,6 @@
android:layout_height="wrap_content"
android:text="应用支持模式设置:"
android:textSize="16sp"
android:textColor="@android:color/black"
android:layout_marginBottom="12dp"/>
<RadioGroup
@@ -26,7 +25,6 @@
android:layout_height="wrap_content"
android:text="无扰单机模式"
android:textSize="14sp"
android:textColor="@android:color/darker_gray"
android:layout_marginBottom="8dp"/>
<RadioButton
@@ -35,7 +33,6 @@
android:layout_height="wrap_content"
android:text="米盟广告模式"
android:textSize="14sp"
android:textColor="@android:color/darker_gray"
android:layout_marginBottom="8dp"/>
<RadioButton
@@ -43,8 +40,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="云宝物语模式"
android:textSize="14sp"
android:textColor="@android:color/darker_gray"/>
android:textSize="14sp"/>
</RadioGroup>