feat: 容器统一加灰色边框,borderCornerRadius 属性统一管理圆角

创建通用灰色边框 drawable(5 模块各一份):
  - bg_container_border.xml:透明填充 + 1dp #B0B0B0 描边
  - 自动应用到 80 个无背景容器的布局文件

深色模式 bg_frame 加边框:
  - drawable-night/bg_frame.xml(mymessagemanager + aes):
    背景 shape 添加 1dp #666666 描边,保留渐变蒙版

统一圆角为 6dp(borderCornerRadius 属性化):
  - 5 模块 attrs.xml 声明 borderCornerRadius(dimension)
  - 12 个主题(6 普通 + 6 深色)设置 borderCornerRadius=6dp
  - 12 个 drawable 文件约 40 处 corners 改用 ?attr/borderCornerRadius
    (bg_frame / bg_frame_black/white / bg_shadow / bg_border_round
     bg_toolbar_log / acard_frame_main / atoolbar_frame / ohpcts_frame
     bg_container_border 等)
  - 3 个 Java 自定义控件(AToolbar / ASupportToolbar / AboutView)
    从硬编码 px 改为读取 ?attr/borderCornerRadius

受益布局模块:libaes / libappbase / appbase / mymessagemanager / aes / winboll
This commit is contained in:
2026-05-09 10:59:55 +08:00
parent b385aa7030
commit 4e4673a93b
108 changed files with 282 additions and 317 deletions

View File

@@ -29,7 +29,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
android:padding="16dp" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"
@@ -43,7 +43,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="vertical">
android:orientation="vertical" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"
@@ -112,7 +112,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal">
android:orientation="horizontal" android:background="@drawable/bg_container_border">
<Button
android:id="@+id/btnSend"

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@android:color/transparent" />
<stroke android:width="1dp" android:color="#FFB0B0B0" />
<corners android:radius="?attr/borderCornerRadius" />
</shape>

View File

@@ -12,11 +12,7 @@
android:angle="270"
android:endColor="#0F000000"
android:startColor="#0F000000" />
<corners
android:bottomLeftRadius="6dip"
android:bottomRightRadius="6dip"
android:topLeftRadius="6dip"
android:topRightRadius="6dip" />
<corners android:radius="?attr/borderCornerRadius" />
</shape>
</item>
<!-- 背景部分 -->
@@ -31,11 +27,7 @@
android:angle="270"
android:endColor="@color/colorAccent"
android:startColor="@color/colorAccent" />
<corners
android:bottomLeftRadius="6dip"
android:bottomRightRadius="6dip"
android:topLeftRadius="6dip"
android:topRightRadius="6dip" />
<corners android:radius="?attr/borderCornerRadius" />
</shape>
</item>
</layer-list>

View File

@@ -4,7 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<cc.winboll.studio.libaes.views.ASupportToolbar
android:layout_width="match_parent"

View File

@@ -4,7 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="horizontal"
@@ -13,7 +13,7 @@
android:layout_gravity="right"
android:gravity="right"
android:padding="10dp"
android:id="@+id/ll_hostbar">
android:id="@+id/ll_hostbar" android:background="@drawable/bg_container_border">
<RadioButton
android:layout_width="wrap_content"
@@ -37,7 +37,7 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
android:gravity="right" android:background="@drawable/bg_container_border">
<Button
android:layout_width="wrap_content"
@@ -57,7 +57,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
android:layout_weight="1.0" android:background="@drawable/bg_container_border">
<cc.winboll.studio.libappbase.LogView
android:layout_width="match_parent"

View File

@@ -4,14 +4,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0"
android:gravity="center_vertical|center_horizontal">
android:gravity="center_vertical|center_horizontal" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"
@@ -25,7 +25,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
android:layout_weight="1.0" android:background="@drawable/bg_container_border">
<cc.winboll.studio.libappbase.LogView
android:layout_width="match_parent"

View File

@@ -5,7 +5,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="top">
android:gravity="top" android:background="@drawable/bg_container_border">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
@@ -20,27 +20,27 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
android:layout_weight="1.0" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.0">
android:layout_weight="1.0" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<cc.winboll.studio.winboll.views.TermuxButton
android:id="@+id/btn_termux"

View File

@@ -4,7 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"

View File

@@ -4,7 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<androidx.appcompat.widget.Toolbar
android:layout_width="match_parent"

View File

@@ -7,7 +7,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical" android:background="@drawable/bg_container_border">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
@@ -19,7 +19,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
android:padding="16dp" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"
@@ -33,7 +33,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="vertical">
android:orientation="vertical" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"
@@ -83,7 +83,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2">
android:weightSum="2" android:background="@drawable/bg_container_border">
<EditText
android:id="@+id/etTemperature"
@@ -121,7 +121,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"
@@ -151,7 +151,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<EditText
android:id="@+id/etAssistantMessage"
@@ -182,7 +182,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="48dp"
android:gravity="center">
android:gravity="center" android:background="@drawable/bg_container_border">
<Button
android:id="@+id/btnSend"

View File

@@ -4,7 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<cc.winboll.studio.libaes.views.ASupportToolbar
android:layout_width="match_parent"

View File

@@ -4,7 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<cc.winboll.studio.libaes.views.ASupportToolbar
android:layout_width="match_parent"
@@ -15,7 +15,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
android:gravity="right" android:background="@drawable/bg_container_border">
<Button
android:textAllCaps="false"
@@ -50,7 +50,7 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
android:layout_weight="1.0" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="match_parent"

View File

@@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="20dp"
android:gravity="center_horizontal">
android:gravity="center_horizontal" android:background="@drawable/bg_container_border">
<Button
android:id="@+id/btn_init_sdk"

View File

@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<android.widget.Toolbar
android:layout_width="match_parent"
@@ -13,21 +13,21 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
android:layout_weight="1.0" android:background="@drawable/bg_container_border">
<LinearLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center">
android:gravity="center" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0"
android:gravity="center_horizontal">
android:gravity="center_horizontal" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"
@@ -41,13 +41,13 @@
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="horizontal"
android:layout_height="wrap_content"
android:gravity="right|center_vertical"
android:layout_width="wrap_content">
android:layout_width="wrap_content" android:background="@drawable/bg_container_border">
<CheckBox
android:layout_width="wrap_content"
@@ -78,18 +78,18 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="400dp">
android:layout_height="400dp" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right">
android:gravity="right" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<Button
android:layout_width="wrap_content"
@@ -109,12 +109,12 @@
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<Button
android:layout_width="wrap_content"
@@ -143,12 +143,12 @@
<HorizontalScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<Button
android:layout_width="wrap_content"

View File

@@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_horizontal"
android:padding="20dp">
android:padding="20dp" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"

View File

@@ -4,7 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="horizontal"
@@ -13,7 +13,7 @@
android:layout_gravity="right"
android:gravity="right"
android:padding="10dp"
android:id="@+id/ll_hostbar">
android:id="@+id/ll_hostbar" android:background="@drawable/bg_container_border">
<RadioButton
android:layout_width="wrap_content"
@@ -38,7 +38,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:gravity="right">
android:gravity="right" android:background="@drawable/bg_container_border">
<Button
android:layout_width="wrap_content"
@@ -52,7 +52,7 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1.0">
android:layout_weight="1.0" android:background="@drawable/bg_container_border">
<cc.winboll.studio.libappbase.LogView
android:layout_width="match_parent"

View File

@@ -10,7 +10,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp">
android:padding="24dp" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"
@@ -25,7 +25,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="wrap_content"
@@ -195,7 +195,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal">
android:orientation="horizontal" android:background="@drawable/bg_container_border">
<Space
android:layout_width="0dp"

View File

@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical" android:background="@drawable/bg_container_border">
<!-- 顶部地址栏区域(水平布局:输入框+功能按钮) -->
<LinearLayout
@@ -33,7 +33,7 @@
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingHorizontal="4dp">
android:paddingHorizontal="4dp" android:background="@drawable/bg_container_border">
<Button
android:id="@+id/btn_load"

View File

@@ -4,12 +4,12 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content" android:background="@drawable/bg_container_border">
<Switch
android:layout_width="match_parent"

View File

@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent" android:background="@drawable/bg_container_border">
<ImageView
android:id="@+id/toolbar_icon"

View File

@@ -11,7 +11,7 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right|center_vertical">
android:gravity="right|center_vertical" android:background="@drawable/bg_container_border">
<TextView
android:layout_width="0dp"

View File

@@ -4,7 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="40dp"
android:layout_height="40dp">
android:layout_height="40dp" android:background="@drawable/bg_container_border">
<ImageView
android:layout_width="40dp"

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="borderCornerRadius" format="dimension" />
<declare-styleable name="CustomToolbar">
<attr name="toolbarTitle" format="string" />
<attr name="toolbarTitleColor" format="color" />