## 核心变更 - 所有布局文件文本颜色统一使用 ?attr/* 主题属性引用 - 普通模式文本颜色: #000000 (黑色) - 暗黑模式文本颜色: #E0E0E0 (灰色) ## attrs.xml 属性统一 (libappbase) - 新增 AboutView 样式属性 (AboutView、AboutViewStyle) - 新增 ButtonStyle 样式属性 (buttonBackgroundColor、buttonTextColor) - 新增 DialogStyle 样式属性 (dialogBackgroundColor、dialogTextColor) - 新增通用窗体属性 (activityBackgroundColor、activityTextColor、toolbarBackgroundColor 等) - 移除 appbase/src/main/res/values/attrs.xml,合并到 libappbase ## styles.xml 主题配置 - 普通模式:背景色 #F5F5F5,文本色 #000000,工具栏/按钮背景色 #00B322 - 暗黑模式 (values-night):背景色 #0D1B2A,文本色 #E0E0E0,工具栏/按钮背景色 #1E3A5F ## 布局适配 - 所有窗体使用 ?attr/activityBackgroundColor / ?attr/activityTextColor - 所有工具栏使用 ?attr/toolbarBackgroundColor - 所有按钮使用 ?attr/buttonBackgroundColor / ?attr/buttonTextColor - 所有对话框使用 ?attr/dialogBackgroundColor / ?attr/dialogTextColor - AboutView 使用 ?attr/aboutViewBackgroundColor 等 ## Java代码适配 - GlobalCrashReportView.java: 默认颜色改为黑色 (Color.BLACK) - CrashHandler.java: 添加 isNightMode 判断,动态设置文本颜色 - AboutView.java: 深色模式标题颜色调整为 gray_500
94 lines
2.6 KiB
XML
94 lines
2.6 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"
|
|
android:background="?attr/aboutViewBackgroundColor">
|
|
|
|
<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"
|
|
android:textColor="?attr/aboutViewTitleColor"/>
|
|
|
|
<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"
|
|
android:textColor="?attr/aboutViewTextColor"/>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1px"
|
|
android:layout_marginTop="4dp"
|
|
android:layout_marginBottom="8dp"
|
|
android:background="?attr/aboutViewDividerColor"/>
|
|
|
|
<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>
|
|
|