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 | 160 ++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 126 insertions(+), 34 deletions(-) diff --git a/app/src/main/res/layout/fragment_reminder_settings.xml b/app/src/main/res/layout/fragment_reminder_settings.xml index 2a5addf..6c6fdc1 100644 --- a/app/src/main/res/layout/fragment_reminder_settings.xml +++ b/app/src/main/res/layout/fragment_reminder_settings.xml @@ -2,53 +2,145 @@ <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:layout_height="56dp" android:background="#FFFFFF" - android:elevation="4dp"> - - <!-- 返回按钮 --> - <ImageButton - android:id="@+id/btn_back" - android:layout_width="48dp" - android:layout_height="48dp" - android:layout_centerVertical="true" - android:background="?attr/selectableItemBackgroundBorderless" - android:src="@android:drawable/ic_menu_close_clear_cancel" - android:contentDescription="返回" /> + 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:text="新增短信提醒" + android:textSize="17sp" + android:textColor="#222222" /> + + <!-- 关闭按钮 --> + <ImageButton + android:id="@+id/btn_close" + android:layout_width="48dp" + android:layout_height="48dp" + 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> - <!-- 快速提醒输入框 --> - <EditText - android:id="@+id/edit_quick_reminder" + <!-- 内容区域 --> + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="16dp" - android:background="@android:drawable/edit_text" - android:hint="快速提醒" - android:padding="12dp" /> + android:orientation="vertical" + android:padding="16dp"> - <!-- 添加提醒按钮 --> - <Button - android:id="@+id/btn_add_reminder" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginHorizontal="16dp" - android:layout_marginTop="16dp" - android:backgroundTint="#03A9F4" - android:text="添加到提醒" - android:textColor="#FFFFFF" /> + <!-- 提醒类型选择 --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_marginBottom="16dp"> -</LinearLayout> \ No newline at end of file + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="选择新增类型 →" + android:textColor="#666666" + android:textSize="14sp" + android:layout_marginBottom="8dp"/> + + <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> + + <!-- 昵称输入框 --> + <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_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