refactor: 重构调试主题,统一定义应用调试文字颜色
1. 重命名调试主题属性 - themeGlobalCrashActivity → themeDebug - GlobalCrashActivityTheme → DebugActivityTheme 2. 新增 debugTextColor 属性 - 定义 debugTextColor 属性,用于统一应用调试文字颜色 - 普通模式: 灰色 #808080 - 深色模式: 绿色 #FF00FF00 3. 重构视图控件 - view_globalcrashreport.xml 和 view_log.xml 使用 themeDebug 主题 - 控件颜色统一引用主题属性 - 日志显示文本使用 debugTextColor 属性 4. GlobalCrashReportView Java 代码 - 新增 obtainDebugTextColor() 方法获取主题中的 debugTextColor - 崩溃视图文字颜色通过主题属性获取,与日志视图一致
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:theme="?attr/themeDebug"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/activityBackgroundColor">
|
||||
android:background="?attr/colorTextBackgound">
|
||||
|
||||
<RelativeLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="34dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="?attr/toolbarBackgroundColor"
|
||||
android:background="?attr/colorTittleBackgound"
|
||||
android:id="@+id/viewlogRelativeLayoutToolbar">
|
||||
|
||||
<Button
|
||||
@@ -19,8 +20,8 @@
|
||||
android:layout_height="@dimen/log_button_height"
|
||||
android:textSize="@dimen/log_text_size"
|
||||
android:text="Clean"
|
||||
android:textColor="?attr/buttonTextColor"
|
||||
android:backgroundTint="?attr/buttonBackgroundColor"
|
||||
android:textColor="?attr/colorText"
|
||||
android:backgroundTint="?attr/colorTittleBackgound"
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/viewlogButtonClean"
|
||||
android:layout_marginLeft="5dp"/>
|
||||
@@ -34,8 +35,8 @@
|
||||
android:layout_toRightOf="@+id/viewlogButtonClean"
|
||||
android:layout_centerVertical="true"
|
||||
android:id="@+id/viewlogTextView1"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:textColor="?attr/buttonTextColor"/>
|
||||
android:background="?attr/colorTittleBackgound"
|
||||
android:textColor="?attr/colorText"/>
|
||||
|
||||
<cc.winboll.studio.libappbase.widget.LogTagSpinner
|
||||
android:layout_width="wrap_content"
|
||||
@@ -52,17 +53,17 @@
|
||||
android:layout_toLeftOf="@+id/viewlogButtonCopy"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Selectable"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/colorTittleBackgound"
|
||||
android:id="@+id/viewlogCheckBoxSelectable"
|
||||
android:padding="@dimen/log_text_padding"
|
||||
android:textColor="?attr/buttonTextColor"/>
|
||||
android:textColor="?attr/colorText"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="@dimen/log_button_width"
|
||||
android:layout_height="@dimen/log_button_height"
|
||||
android:textSize="@dimen/log_text_size"
|
||||
android:textColor="?attr/buttonTextColor"
|
||||
android:backgroundTint="?attr/buttonBackgroundColor"
|
||||
android:textColor="?attr/colorText"
|
||||
android:backgroundTint="?attr/colorTittleBackgound"
|
||||
android:text="Copy"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
@@ -78,7 +79,7 @@
|
||||
android:layout_below="@+id/viewlogRelativeLayoutToolbar"
|
||||
android:id="@+id/viewlogLinearLayout1"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?attr/toolbarBackgroundColor">
|
||||
android:background="?attr/colorTittleBackgound">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
@@ -87,8 +88,8 @@
|
||||
android:text="ALL"
|
||||
android:padding="2dp"
|
||||
android:id="@+id/viewlogCheckBox1"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:textColor="?attr/buttonTextColor"
|
||||
android:background="?attr/colorTittleBackgound"
|
||||
android:textColor="?attr/colorText"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"/>
|
||||
|
||||
@@ -97,15 +98,15 @@
|
||||
android:ems="10"
|
||||
android:layout_height="@dimen/log_button_height"
|
||||
android:textSize="@dimen/log_text_size"
|
||||
android:textColor="?attr/activityTextColor"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:textColor="?attr/colorText"
|
||||
android:background="?attr/colorTittleBackgound"
|
||||
android:singleLine="true"
|
||||
android:id="@+id/tagsearch_et"/>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/buttonBackgroundColor"
|
||||
android:background="?attr/colorTittleBackgound"
|
||||
android:scrollbars="none"
|
||||
android:padding="2dp"
|
||||
android:layout_weight="1.0"
|
||||
@@ -131,7 +132,7 @@
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/activityBackgroundColor"
|
||||
android:background="?attr/colorTextBackgound"
|
||||
android:id="@+id/viewlogScrollViewLog">
|
||||
|
||||
<TextView
|
||||
@@ -139,7 +140,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="@dimen/log_text_size"
|
||||
android:text="Text"
|
||||
android:textColor="#FF00FF00"
|
||||
android:textColor="?attr/debugTextColor"
|
||||
android:textIsSelectable="true"
|
||||
android:id="@+id/viewlogTextViewLog"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user