更新 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

@@ -0,0 +1,260 @@
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#F5F5F5">
<!-- 顶部栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/purple_500"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<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"
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>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- 应用权限 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:text="应用权限"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#333333" />
<!-- 通知访问权限 -->
<LinearLayout
android:id="@+id/layout_notification_access"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="16dp"
android:gravity="center_vertical"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground">
<ImageView
android:id="@+id/icon_notification_access"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@android:drawable/ic_dialog_info"
app:tint="@color/purple_500" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="12dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="通知访问权限"
android:textSize="15sp"
android:textColor="#333333" />
<TextView
android:id="@+id/status_notification_access"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点击授权"
android:textSize="12sp"
android:textColor="#888888" />
</LinearLayout>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_action_next"
app:tint="#888888" />
</LinearLayout>
<!-- 通知消息权限 -->
<LinearLayout
android:id="@+id/layout_post_notifications"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="16dp"
android:gravity="center_vertical"
android:layout_marginBottom="8dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground">
<ImageView
android:id="@+id/icon_post_notifications"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@android:drawable/ic_dialog_info"
app:tint="@color/purple_500" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="12dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="通知消息权限"
android:textSize="15sp"
android:textColor="#333333" />
<TextView
android:id="@+id/status_post_notifications"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点击授权"
android:textSize="12sp"
android:textColor="#888888" />
</LinearLayout>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_action_next"
app:tint="#888888" />
</LinearLayout>
<!-- 电池优化 -->
<LinearLayout
android:id="@+id/layout_battery"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="horizontal"
android:padding="16dp"
android:gravity="center_vertical"
android:layout_marginBottom="16dp"
android:clickable="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground">
<ImageView
android:id="@+id/icon_battery"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@android:drawable/ic_dialog_info"
app:tint="@color/purple_500" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="12dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="电池优化白名单"
android:textSize="15sp"
android:textColor="#333333" />
<TextView
android:id="@+id/status_battery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="点击设置"
android:textSize="12sp"
android:textColor="#888888" />
</LinearLayout>
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_action_next"
app:tint="#888888" />
</LinearLayout>
<!-- 厂商设置 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:text="厂商设置"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="#333333" />
<TextView
android:id="@+id/tv_device_brand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:text="检测到设备"
android:textColor="#666666"
android:textSize="12sp" />
<Button
android:id="@+id/btn_autostart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="开启自启动权限"
android:textColor="@color/white"
android:backgroundTint="#FF3700B3" />
<Button
android:id="@+id/btn_battery_optimization"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="关闭电池优化"
android:textColor="@color/white"
android:backgroundTint="#FF3700B3" />
</LinearLayout>
</ScrollView>
</LinearLayout>