更新 UI 布局文件和主题样式

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
wchino
2026-04-05 22:29:56 +08:00
parent f0fe8de4e2
commit af788d00cd
15 changed files with 1654 additions and 380 deletions

View File

@@ -1,91 +1,197 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
android:background="#F5F5F5">
<com.google.android.material.appbar.AppBarLayout
<!-- 顶部栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="56dp"
android:background="@color/purple_500"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
<ImageView
android:id="@+id/iv_back"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_action_back" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:title="@string/app_name"
app:titleTextColor="@color/white" />
</com.google.android.material.appbar.AppBarLayout>
android:layout_marginStart="16dp"
android:text="监听控制台"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<View
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/tv_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="用户"
android:textColor="#E0E0E0"
android:textSize="14sp" />
</LinearLayout>
<!-- 状态栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<TextView
android:id="@+id/tv_status"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="状态: 未启动"
android:textColor="#888888"
android:textSize="14sp" />
<Button
android:id="@+id/btn_settings"
android:layout_width="wrap_content"
android:layout_height="36dp"
android:text="设置"
android:textSize="12sp"
android:textColor="@color/white"
android:backgroundTint="#FF3700B3" />
</LinearLayout>
<!-- 统计栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="5dp">
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:padding="12dp">
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center_vertical"
android:text="监听App列表"
android:paddingStart="5dp"
android:drawableTint="@color/black"
android:drawableEnd="@drawable/ic_action_next"
android:id="@+id/jianting_list"
android:textColor="@color/black" />
android:id="@+id/tv_configured_apps"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="已配置: 0个"
android:textColor="#333333"
android:textSize="14sp" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_width="1dp"
android:layout_height="20dp"
android:background="#DDDDDD" />
<LinearLayout
<TextView
android:id="@+id/tv_monitored_count"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="监听: 0"
android:textColor="#333333"
android:textSize="14sp" />
<View
android:layout_width="1dp"
android:layout_height="20dp"
android:background="#DDDDDD" />
<TextView
android:id="@+id/tv_uploaded_count"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="上传: 0"
android:textColor="#333333"
android:textSize="14sp" />
<View
android:layout_width="1dp"
android:layout_height="20dp"
android:background="#DDDDDD" />
<TextView
android:id="@+id/tv_success_rate"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="成功率: --"
android:textColor="#333333"
android:textSize="14sp" />
</LinearLayout>
<!-- 日志区域 -->
<androidx.core.widget.NestedScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:background="@color/white"
android:fillViewport="true"
android:padding="12dp">
<TextView
android:id="@+id/tv_log"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:textColor="#333333"
android:textSize="13sp"
android:fontFamily="monospace"
android:textIsSelectable="true" />
</androidx.core.widget.NestedScrollView>
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:text="开启监听"
android:textColor="@color/white"
tools:ignore="HardcodedText" />
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="16dp">
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:visibility="gone"
android:text="测试接口"
android:textColor="@color/white"
tools:ignore="HardcodedText" />
<Button
android:id="@+id/btn_clear_log"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:layout_marginEnd="8dp"
android:text="清空日志"
android:textColor="#666666"
android:backgroundTint="#EEEEEE" />
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:layout_weight="1"
android:text="清理数据"
android:textColor="@color/white"
tools:ignore="HardcodedText" />
</LinearLayout>
<androidx.core.widget.NestedScrollView
android:id="@+id/scrollable"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textIsSelectable="true" />
</androidx.core.widget.NestedScrollView>
<Button
android:id="@+id/btn_toggle_monitor"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:layout_marginStart="8dp"
android:text="开始监听"
android:textColor="@color/white"
android:backgroundTint="@color/purple_500" />
</LinearLayout>
</LinearLayout>
</LinearLayout>