From 49f4b178d05c69f7da7b2200f394ece296766bdb Mon Sep 17 00:00:00 2001 From: cloudroam <cloudroam> Date: 星期二, 25 二月 2025 18:03:45 +0800 Subject: [PATCH] fix 提醒样式处理 --- app/src/main/res/layout/fragment_reminder_settings.xml | 162 ++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 110 insertions(+), 52 deletions(-) diff --git a/app/src/main/res/layout/fragment_reminder_settings.xml b/app/src/main/res/layout/fragment_reminder_settings.xml index 8403cd9..6c6fdc1 100644 --- a/app/src/main/res/layout/fragment_reminder_settings.xml +++ b/app/src/main/res/layout/fragment_reminder_settings.xml @@ -2,21 +2,23 @@ <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="#FAFAFA"> <!-- 标题栏 --> <RelativeLayout android:layout_width="match_parent" - android:layout_height="?attr/actionBarSize" - android:background="#FFFFFF"> + android:layout_height="56dp" + android:background="#FFFFFF" + android:elevation="1dp"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:text="新增短信提醒" - android:textSize="18sp" - android:textColor="#000000" /> + android:textSize="17sp" + android:textColor="#222222" /> <!-- 关闭按钮 --> <ImageButton @@ -26,63 +28,119 @@ android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:background="?attr/selectableItemBackgroundBorderless" + android:padding="12dp" android:src="@android:drawable/ic_menu_close_clear_cancel" /> </RelativeLayout> - <!-- 提醒类型选择 --> - <Spinner - android:id="@+id/spinner_type" + <!-- 内容区域 --> + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="16dp" - android:padding="12dp" - android:background="@android:drawable/btn_dropdown" /> + android:orientation="vertical" + android:padding="16dp"> - <!-- 昵称输入框 --> - <EditText - android:id="@+id/edit_nickname" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginHorizontal="16dp" - android:hint="昵称" - android:padding="12dp" - android:background="@android:drawable/edit_text" /> + <!-- 提醒类型选择 --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginBottom="16dp"> - <!-- 关键词输入框 --> - <EditText - android:id="@+id/edit_keywords" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_margin="16dp" - android:hint="关键词" - android:padding="12dp" - android:background="@android:drawable/edit_text" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="选择新增类型 →" + android:textColor="#666666" + android:textSize="14sp" + android:layout_marginBottom="8dp"/> - <!-- 已添加列表标题 --> - <Button - android:id="@+id/btn_add_reminder" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_margin="16dp" - android:backgroundTint="#03A9F4" - android:text="确定新增" - android:textColor="#FFFFFF" /> + <Spinner + android:id="@+id/spinner_type" + android:layout_width="match_parent" + android:layout_height="48dp" + android:background="@drawable/bg_edit_border" + android:paddingHorizontal="12dp"/> + </LinearLayout> - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:padding="16dp" - android:text="已添加列表" - android:textStyle="bold" /> + <!-- 昵称输入框 --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginBottom="16dp"> - <!-- 已添加列表 --> - <androidx.recyclerview.widget.RecyclerView - android:id="@+id/recycler_reminders" - android:layout_width="match_parent" - android:layout_height="221dp" - android:layout_weight="1" - android:padding="8dp" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="昵称 →" + android:textColor="#666666" + android:textSize="14sp" + android:layout_marginBottom="8dp"/> - <!-- 确定新增按钮 --> + <EditText + android:id="@+id/edit_nickname" + android:layout_width="match_parent" + android:layout_height="48dp" + android:background="@drawable/bg_edit_border" + android:hint="仅用于显示与区分,可任意输入" + android:textColorHint="#999999" + android:textSize="14sp" + android:paddingHorizontal="12dp"/> + </LinearLayout> + + <!-- 关键词输入框 --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginBottom="16dp"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="关键词 →" + android:textColor="#666666" + android:textSize="14sp" + android:layout_marginBottom="8dp"/> + + <EditText + android:id="@+id/edit_keywords" + android:layout_width="match_parent" + android:layout_height="48dp" + android:background="@drawable/bg_edit_border" + android:hint="用于匹配短信类型" + android:textColorHint="#999999" + android:textSize="14sp" + android:paddingHorizontal="12dp"/> + </LinearLayout> + + <!-- 确定新增按钮 --> + <Button + android:id="@+id/btn_add_reminder" + android:layout_width="match_parent" + android:layout_height="48dp" + android:text="确定新增" + android:textColor="#FFFFFF" + android:textSize="16sp" + android:background="@drawable/bg_button_primary" + android:layout_marginTop="16dp"/> + + <!-- 已添加列表 --> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="已添加列表 →" + android:textColor="#666666" + android:textSize="14sp" + android:layout_marginTop="24dp" + android:layout_marginBottom="8dp"/> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recycler_reminders" + android:layout_width="match_parent" + android:layout_height="160dp" + android:layout_marginTop="2dp" /> + + </LinearLayout> </LinearLayout> \ No newline at end of file -- Gitblit v1.9.3