Merge remote-tracking branch 'origin/appbase' into aes

This commit is contained in:
2026-05-12 09:22:37 +08:00
23 changed files with 95 additions and 76 deletions

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Mon May 11 20:30:06 HKT 2026
stageCount=9
#Tue May 12 09:17:15 HKT 2026
stageCount=10
libraryProject=libappbase
baseVersion=15.20
publishVersion=15.20.8
publishVersion=15.20.9
buildCount=0
baseBetaVersion=15.20.9
baseBetaVersion=15.20.10

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Mon May 11 20:29:55 HKT 2026
stageCount=9
#Tue May 12 09:16:45 HKT 2026
stageCount=10
libraryProject=libappbase
baseVersion=15.20
publishVersion=15.20.8
publishVersion=15.20.9
buildCount=0
baseBetaVersion=15.20.9
baseBetaVersion=15.20.10

View File

@@ -8,6 +8,7 @@ package cc.winboll.studio.libappbase;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Handler;
import android.os.Message;
import android.text.Editable;
@@ -248,7 +249,10 @@ public class LogView extends RelativeLayout {
}
mSelectAllTAGCheckBox.setLayoutParams(layoutParams2);
//mSelectAllTAGCheckBox.setPadding(0,0,0,0);
mSelectAllTAGCheckBox.setTextColor(mContext.getResources().getColor(R.color.white));
TypedArray ta1 = mContext.obtainStyledAttributes(new int[] { R.attr.toolbarTextColor });
int toolbarTextColor1 = ta1.getColor(0, mContext.getResources().getColor(R.color.white));
ta1.recycle();
mSelectAllTAGCheckBox.setTextColor(toolbarTextColor1);
mSelectAllTAGCheckBox.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
@@ -502,10 +506,17 @@ public class LogView extends RelativeLayout {
}
holder.tvText.setLayoutParams(layoutParams);
holder.tvText.setPadding(0,0,0,0);
holder.tvText.setTextColor(mContext.getResources().getColor(R.color.white));
TypedArray ta2 = mContext.obtainStyledAttributes(new int[] { R.attr.toolbarTextColor });
int toolbarTextColor2 = ta2.getColor(0, mContext.getResources().getColor(R.color.white));
ta2.recycle();
holder.tvText.setTextColor(toolbarTextColor2);
holder.cbChecked.setChecked(item.isChecked());
holder.cbChecked.setLayoutParams(layoutParams);
holder.cbChecked.setPadding(0,0,0,0);
TypedArray ta3 = mContext.obtainStyledAttributes(new int[] { R.attr.toolbarTextColor });
int toolbarTextColor3 = ta3.getColor(0, mContext.getResources().getColor(R.color.white));
ta3.recycle();
holder.cbChecked.setTextColor(toolbarTextColor3);
holder.cbChecked.setOnClickListener(new View.OnClickListener(){
@Override

View File

@@ -3,6 +3,7 @@ package cc.winboll.studio.libappbase.widget;
import android.content.Context;
import android.graphics.Color;
import android.text.TextUtils;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.View;
@@ -153,9 +154,12 @@ public class LogTagSpinner extends Spinner {
itemTv.setPadding(mTextPadding, 0, mTextPadding, 0);
// 4. 文字对齐(垂直居中+靠左,符合常规 UI 设计)
//itemTv.setGravity(View.GRAVITY_CENTER_VERTICAL | View.GRAVITY_START);
// 5. 文字颜色(统一深色,可改为项目颜色资源
itemTv.setTextColor(this.mContext.getColor(R.color.white));
itemTv.setBackgroundColor(this.mContext.getColor(R.color.btn_gray_normal));
// 5. 文字颜色(使用主题属性 ?attr/toolbarTextColor
TypedArray ta = mContext.obtainStyledAttributes(new int[] { R.attr.toolbarTextColor });
int toolbarTextColor = ta.getColor(0, mContext.getResources().getColor(R.color.white));
ta.recycle();
itemTv.setTextColor(toolbarTextColor);
itemTv.setBackgroundColor(this.mContext.getResources().getColor(R.color.btn_gray_normal));
// 6. 文字溢出处理(最多 2 行,超出省略,避免长标签换行过多)
itemTv.setSingleLine(false);
itemTv.setMaxLines(2);

View File

@@ -50,8 +50,8 @@
android:layout_height="wrap_content"
android:text="功能按钮待激活"
android:textSize="16sp"
android:textColor="?attr/buttonTextColor"
android:backgroundTint="?attr/buttonBackgroundColor"
android:textColor="?attr/toolbarTextColor"
android:backgroundTint="?attr/toolbarBackgroundColor"
android:padding="14dp"
android:enabled="false"/>

View File

@@ -53,8 +53,8 @@
android:layout_height="wrap_content"
android:text="确认"
android:textSize="14sp"
android:backgroundTint="?attr/buttonBackgroundColor"
android:textColor="?attr/buttonTextColor"/>
android:backgroundTint="?attr/toolbarBackgroundColor"
android:textColor="?attr/toolbarTextColor"/>
</LinearLayout>

View File

@@ -18,6 +18,7 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/log_button_height"
android:textSize="@dimen/log_text_size"
android:textColor="?attr/toolbarTextColor"
android:id="@+id/viewlogtagCheckBox1"/>
</LinearLayout>

View File

@@ -15,13 +15,13 @@
android:background="?attr/colorTittleBackgound"
android:id="@+id/viewlogRelativeLayoutToolbar">
<Button
<Button
android:layout_width="@dimen/log_button_width"
android:layout_height="@dimen/log_button_height"
android:textSize="@dimen/log_text_size"
android:text="Clean"
android:textColor="?attr/colorText"
android:backgroundTint="?attr/colorTittleBackgound"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:layout_centerVertical="true"
android:id="@+id/viewlogButtonClean"
android:layout_marginLeft="5dp"/>
@@ -36,7 +36,7 @@
android:layout_centerVertical="true"
android:id="@+id/viewlogTextView1"
android:background="?attr/colorTittleBackgound"
android:textColor="?attr/colorText"/>
android:textColor="?attr/toolbarTextColor"/>
<cc.winboll.studio.libappbase.widget.LogTagSpinner
android:layout_width="wrap_content"
@@ -56,14 +56,14 @@
android:background="?attr/colorTittleBackgound"
android:id="@+id/viewlogCheckBoxSelectable"
android:padding="@dimen/log_text_padding"
android:textColor="?attr/colorText"/>
android:textColor="?attr/toolbarTextColor"/>
<Button
android:layout_width="@dimen/log_button_width"
android:layout_height="@dimen/log_button_height"
android:textSize="@dimen/log_text_size"
android:textColor="?attr/colorText"
android:backgroundTint="?attr/colorTittleBackgound"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:text="Copy"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
@@ -89,7 +89,7 @@
android:padding="2dp"
android:id="@+id/viewlogCheckBox1"
android:background="?attr/colorTittleBackgound"
android:textColor="?attr/colorText"
android:textColor="?attr/toolbarTextColor"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"/>

View File

@@ -50,8 +50,8 @@
android:layout_height="wrap_content"
android:text="功能按钮待激活"
android:textSize="16sp"
android:textColor="?attr/buttonTextColor"
android:backgroundTint="?attr/buttonBackgroundColor"
android:textColor="?attr/toolbarTextColor"
android:backgroundTint="?attr/toolbarBackgroundColor"
android:padding="14dp"
android:enabled="false"/>

View File

@@ -53,8 +53,8 @@
android:layout_height="wrap_content"
android:text="确认"
android:textSize="14sp"
android:backgroundTint="?attr/buttonBackgroundColor"
android:textColor="?attr/buttonTextColor"/>
android:backgroundTint="?attr/toolbarBackgroundColor"
android:textColor="?attr/toolbarTextColor"/>
</LinearLayout>

View File

@@ -18,6 +18,7 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/log_button_height"
android:textSize="@dimen/log_text_size"
android:textColor="?attr/toolbarTextColor"
android:id="@+id/viewlogtagCheckBox1"/>
</LinearLayout>

View File

@@ -20,8 +20,8 @@
android:layout_height="@dimen/log_button_height"
android:textSize="@dimen/log_text_size"
android:text="Clean"
android:textColor="?attr/colorText"
android:backgroundTint="?attr/colorTittleBackgound"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:layout_centerVertical="true"
android:id="@+id/viewlogButtonClean"
android:layout_marginLeft="5dp"/>
@@ -36,7 +36,7 @@
android:layout_centerVertical="true"
android:id="@+id/viewlogTextView1"
android:background="?attr/colorTittleBackgound"
android:textColor="?attr/colorText"/>
android:textColor="?attr/toolbarTextColor"/>
<cc.winboll.studio.libappbase.widget.LogTagSpinner
android:layout_width="wrap_content"
@@ -56,14 +56,14 @@
android:background="?attr/colorTittleBackgound"
android:id="@+id/viewlogCheckBoxSelectable"
android:padding="@dimen/log_text_padding"
android:textColor="?attr/colorText"/>
android:textColor="?attr/toolbarTextColor"/>
<Button
android:layout_width="@dimen/log_button_width"
android:layout_height="@dimen/log_button_height"
android:textSize="@dimen/log_text_size"
android:textColor="?attr/colorText"
android:backgroundTint="?attr/colorTittleBackgound"
android:textColor="?attr/activityTextColor"
android:background="?attr/toolbarBackgroundColor"
android:text="Copy"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
@@ -89,7 +89,7 @@
android:padding="2dp"
android:id="@+id/viewlogCheckBox1"
android:background="?attr/colorTittleBackgound"
android:textColor="?attr/colorText"
android:textColor="?attr/toolbarTextColor"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"/>

View File

@@ -20,11 +20,7 @@
<attr name="aboutViewDividerColor" format="color" />
</declare-styleable>
<!-- ButtonStyle 样式属性 -->
<declare-styleable name="ButtonStyle">
<attr name="buttonBackgroundColor" format="color" />
<attr name="buttonTextColor" format="color" />
</declare-styleable>
<!-- DialogStyle 样式属性 -->
<declare-styleable name="DialogStyle">

View File

@@ -63,7 +63,9 @@
<!-- ============== 主题颜色 ============== -->
<color name="mainWindowBackgroundColor">#FF0D1B2A</color>
<color name="mainWindowTextColor">#FFE0E0E0</color>
<color name="buttonBackgroundColor">#FF1E3A5F</color>
<color name="toolbarTextColor">#FFE0E0E0</color>
<color name="toolbarBackgroundColor">#FF1E3A5F</color>
<color name="debugTextColor">#FF00FF00</color>
</resources>

View File

@@ -8,12 +8,12 @@
<item name="aboutViewTextColor">?attr/mainWindowDarkTextColor</item>
<item name="aboutViewTitleColor">?attr/mainWindowDarkTextColor</item>
<item name="aboutViewDividerColor">?attr/mainWindowTextColor</item>
<item name="buttonBackgroundColor">@color/buttonBackgroundColor</item>
<item name="buttonTextColor">?attr/mainWindowDarkTextColor</item>
<item name="dialogBackgroundColor">?attr/mainWindowDarkBackgroundColor</item>
<item name="dialogTextColor">?attr/mainWindowDarkTextColor</item>
<item name="toolbarBackgroundColor">?attr/buttonBackgroundColor</item>
<item name="toolbarTextColor">?attr/mainWindowDarkTextColor</item>
<item name="toolbarBackgroundColor">@color/toolbarBackgroundColor</item>
<item name="toolbarTextColor">@color/toolbarTextColor</item>
<item name="textViewBackgroundColor">?attr/mainWindowDarkBackgroundColor</item>
<item name="textViewTextColor">?attr/mainWindowDarkTextColor</item>
<item name="editTextBackgroundColor">?attr/mainWindowDarkBackgroundColor</item>
@@ -29,12 +29,14 @@
<!-- DebugActivityTheme 深色模式样式 -->
<style name="DebugActivityTheme" parent="@android:style/Theme.DeviceDefault.NoActionBar">
<item name="android:statusBarColor">@color/mainWindowBackgroundColor</item>
<item name="android:statusBarColor">@color/toolbarBackgroundColor</item>
<item name="colorTittle">?attr/mainWindowDarkTextColor</item>
<item name="colorTittleBackgound">@color/buttonBackgroundColor</item>
<item name="colorTittleBackgound">@color/toolbarBackgroundColor</item>
<item name="colorText">?attr/debugTextColor</item>
<item name="colorTextBackgound">?attr/mainWindowDarkBackgroundColor</item>
<item name="debugTextColor">@color/debugTextColor</item>
<item name="toolbarTextColor">@color/toolbarTextColor</item>
</style>
<!-- DialogStyle 对话框样式 -->

View File

@@ -26,11 +26,7 @@
<attr name="aboutViewDividerColor" format="color" />
</declare-styleable>
<!-- ButtonStyle 样式属性 -->
<declare-styleable name="ButtonStyle">
<attr name="buttonBackgroundColor" format="color" />
<attr name="buttonTextColor" format="color" />
</declare-styleable>
<!-- DialogStyle 样式属性 -->
<declare-styleable name="DialogStyle">

View File

@@ -63,7 +63,9 @@
<!-- ============== 主题颜色 ============== -->
<color name="mainWindowBackgroundColor">#FFF5F5F5</color>
<color name="mainWindowTextColor">#FF000000</color>
<color name="buttonBackgroundColor">#FF00B322</color>
<color name="toolbarTextColor">#FF000000</color>
<color name="toolbarBackgroundColor">#FF00B322</color>
<color name="debugTextColor">#FF808080</color>
</resources>

View File

@@ -8,12 +8,12 @@
<item name="aboutViewTextColor">?attr/mainWindowTextColor</item>
<item name="aboutViewTitleColor">?attr/mainWindowTextColor</item>
<item name="aboutViewDividerColor">?attr/mainWindowDarkTextColor</item>
<item name="buttonBackgroundColor">@color/buttonBackgroundColor</item>
<item name="buttonTextColor">?attr/mainWindowTextColor</item>
<item name="dialogBackgroundColor">?attr/mainWindowBackgroundColor</item>
<item name="dialogTextColor">?attr/mainWindowTextColor</item>
<item name="toolbarBackgroundColor">?attr/buttonBackgroundColor</item>
<item name="toolbarTextColor">?attr/mainWindowTextColor</item>
<item name="toolbarBackgroundColor">@color/toolbarBackgroundColor</item>
<item name="toolbarTextColor">@color/toolbarTextColor</item>
<item name="textViewBackgroundColor">?attr/mainWindowBackgroundColor</item>
<item name="textViewTextColor">?attr/mainWindowTextColor</item>
<item name="editTextBackgroundColor">?attr/mainWindowBackgroundColor</item>
@@ -29,12 +29,14 @@
<!-- DebugActivityTheme 普通模式样式 -->
<style name="DebugActivityTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
<item name="android:statusBarColor">@color/buttonBackgroundColor</item>
<item name="android:statusBarColor">@color/toolbarBackgroundColor</item>
<item name="colorTittle">?attr/mainWindowTextColor</item>
<item name="colorTittleBackgound">@color/buttonBackgroundColor</item>
<item name="colorTittleBackgound">@color/toolbarBackgroundColor</item>
<item name="colorText">?attr/debugTextColor</item>
<item name="colorTextBackgound">?attr/mainWindowBackgroundColor</item>
<item name="debugTextColor">@color/debugTextColor</item>
<item name="toolbarTextColor">@color/toolbarTextColor</item>
</style>
<!-- DialogStyle 对话框样式 -->