Files
WinBoLL/appbase/src/main/res/layout-night/activity_main.xml
LaizyBoy fe0b2f97ea 重构日志窗口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: 添加新的颜色定义

【适配说明】
- 统一普通模式和深色模式的颜色管理
- 确保日志窗口所有控件颜色与主窗口保持一致
2026-05-12 09:13:16 +08:00

106 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="0dp"
android:background="?attr/activityBackgroundColor">
<android.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/toolbarBackgroundColor"
android:id="@+id/toolbar"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_vertical"
android:spacing="12dp">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="关于应用"
android:textSize="16sp"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:paddingVertical="12dp"
android:layout_marginHorizontal="24dp"
android:onClick="onAboutActivity"
android:layout_margin="10dp"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="应用崩溃测试"
android:textSize="16sp"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:paddingVertical="12dp"
android:layout_marginHorizontal="24dp"
android:onClick="onCrashTest"
android:layout_margin="10dp"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="应用日志测试"
android:textSize="16sp"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:paddingVertical="12dp"
android:layout_marginHorizontal="24dp"
android:onClick="onLogTest"
android:layout_margin="10dp"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="应用日志测试(新窗口)"
android:textSize="16sp"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:paddingVertical="12dp"
android:layout_marginHorizontal="24dp"
android:onClick="onLogTestNewTask"
android:layout_margin="10dp"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="应用吐司测试"
android:textSize="16sp"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:paddingVertical="12dp"
android:layout_marginHorizontal="24dp"
android:onClick="onToastUtilsTest"
android:layout_margin="10dp"/>
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="多开窗口"
android:textSize="16sp"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:paddingVertical="12dp"
android:layout_marginHorizontal="24dp"
android:onClick="onMultiInstance"
android:layout_margin="10dp"/>
</LinearLayout>
</ScrollView>
</LinearLayout>