主题改造(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
91 lines
2.5 KiB
XML
91 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<ScrollView
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:gravity="center_horizontal"
|
|
android:paddingLeft="16dp"
|
|
android:paddingTop="16dp"
|
|
android:paddingRight="16dp"
|
|
android:paddingBottom="16dp">
|
|
|
|
<cc.winboll.studio.libappbase.views.DebugSwitchImageView
|
|
android:id="@+id/iv_app_icon"
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:layout_marginBottom="8dp"
|
|
android:scaleType="centerCrop"/>
|
|
|
|
<TextView
|
|
android:id="@+id/tv_app_name_version"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textSize="18sp"/>
|
|
|
|
<TextView
|
|
android:id="@+id/tv_app_desc"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="4dp"
|
|
android:layout_marginBottom="8dp"
|
|
android:textSize="14sp"/>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1px"
|
|
android:layout_marginTop="4dp"
|
|
android:layout_marginBottom="8dp"
|
|
android:background="@color/gray_200"/>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/ll_function_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"/>
|
|
|
|
<LinearLayout
|
|
android:orientation="horizontal"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center"
|
|
android:layout_marginTop="8dp"
|
|
android:spacing="20dp">
|
|
|
|
<ImageButton
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:src="@drawable/ic_debug_step_over"
|
|
android:id="@+id/ib_debug_step_over"
|
|
android:scaleType="fitCenter"
|
|
android:adjustViewBounds="true"
|
|
android:background="@null"/>
|
|
|
|
<ImageButton
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:src="@drawable/ic_winboll"
|
|
android:id="@+id/ib_winbollhostdialog"
|
|
android:scaleType="fitCenter"
|
|
android:adjustViewBounds="true"
|
|
android:background="@null"/>
|
|
|
|
<ImageButton
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:src="@drawable/ic_key"
|
|
android:id="@+id/ib_signgetdialog"
|
|
android:scaleType="fitCenter"
|
|
android:adjustViewBounds="true"
|
|
android:background="@null"/>
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
</ScrollView>
|
|
|