重构日志窗口UI主题颜色系统,统一使用toolbarTextColor和toolbarBackgroundColor
【主要变更】 1. 新增主题颜色属性 - 新增 toolbarTextColor 属性定义(普通模式:黑色, 深色模式:#E0E0E0) - 新增 toolbarBackgroundColor 属性定义(普通模式:绿色, 深色模式:深蓝色) 2. 移除废弃颜色属性 - 移除 buttonTextColor 属性定义 - 移除 buttonBackgroundColor 属性定义 3. 更新布局文件(普通模式+深色模式) - view_log.xml: TextView(LV:)、CheckBox(Selectable/ALL) 使用 toolbarTextColor - view_log.xml: Button(Clean/Copy) 使用 toolbarBackgroundColor - item_logtag.xml: CheckBox 使用 toolbarTextColor - activity_main.xml: 所有Button使用 toolbarBackgroundColor - activity_crash_test.xml: 所有Button使用 toolbarBackgroundColor - activity_nfc_rsa_operate.xml: Button使用 toolbarBackgroundColor - dialog_winboll_host.xml: Button使用 toolbarBackgroundColor 4. 更新Java代码 - LogView.java: CheckBox和TextView使用主题属性获取 toolbarTextColor - LogTagSpinner.java: 下拉框文本颜色使用 toolbarTextColor 5. 更新样式定义 - styles.xml: 主题属性引用新的 toolbarTextColor/toolbarBackgroundColor - attrs.xml: 移除废弃属性,保留 toolbarTextColor/toolbarBackgroundColor - colors.xml: 添加新的颜色定义 【适配说明】 - 统一普通模式和深色模式的颜色管理 - 确保日志窗口所有控件颜色与主窗口保持一致
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
android:text="关于应用"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onAboutActivity"
|
||||
@@ -43,7 +43,7 @@
|
||||
android:text="应用崩溃测试"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onCrashTest"
|
||||
@@ -55,7 +55,7 @@
|
||||
android:text="应用日志测试"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onLogTest"
|
||||
@@ -67,7 +67,7 @@
|
||||
android:text="应用日志测试(新窗口)"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onLogTestNewTask"
|
||||
@@ -79,7 +79,7 @@
|
||||
android:text="应用吐司测试"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onToastUtilsTest"
|
||||
@@ -93,7 +93,7 @@
|
||||
android:text="多开窗口"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onMultiInstance"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
android:text="返回"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onBack"
|
||||
@@ -47,7 +47,7 @@
|
||||
android:text="测试崩溃"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onTestCrash"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
android:text="关于应用"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onAboutActivity"
|
||||
@@ -43,7 +43,7 @@
|
||||
android:text="应用崩溃测试"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onCrashTest"
|
||||
@@ -55,7 +55,7 @@
|
||||
android:text="应用日志测试"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onLogTest"
|
||||
@@ -67,7 +67,7 @@
|
||||
android:text="应用日志测试(新窗口)"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onLogTestNewTask"
|
||||
@@ -79,7 +79,7 @@
|
||||
android:text="应用吐司测试"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onToastUtilsTest"
|
||||
@@ -93,7 +93,7 @@
|
||||
android:text="多开窗口"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:paddingVertical="12dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:onClick="onMultiInstance"
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
|
||||
<style name="MyDebugActivityTheme" parent="DebugActivityTheme">
|
||||
<item name="colorTittle">?attr/mainWindowDarkTextColor</item>
|
||||
<item name="colorTittleBackgound">@color/buttonBackgroundColor</item>
|
||||
<item name="colorTittleBackgound">?attr/toolbarBackgroundColor</item>
|
||||
<item name="colorText">?attr/debugTextColor</item>
|
||||
<item name="colorTextBackgound">?attr/mainWindowDarkBackgroundColor</item>
|
||||
<item name="toolbarTextColor">@color/toolbarTextColor</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -6,8 +6,9 @@
|
||||
|
||||
<style name="MyDebugActivityTheme" parent="DebugActivityTheme">
|
||||
<item name="colorTittle">?attr/mainWindowTextColor</item>
|
||||
<item name="colorTittleBackgound">@color/buttonBackgroundColor</item>
|
||||
<item name="colorTittleBackgound">?attr/toolbarBackgroundColor</item>
|
||||
<item name="colorText">?attr/debugTextColor</item>
|
||||
<item name="colorTextBackgound">?attr/mainWindowBackgroundColor</item>
|
||||
<item name="toolbarTextColor">@color/toolbarTextColor</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user