将简单的日程列表升级为功能完整的日程管理系统 #31
Merged
pvexk5qol
merged 1 commits from caoweiqiong_branch into master 4 weeks ago
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 按下状态:灰色 -->
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<solid android:color="#E0E0E0" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 默认状态:透明 -->
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="@android:color/transparent" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#80000000" /> <!-- 半透明黑色 -->
|
||||
<corners android:radius="12dp" /> <!-- 圆角 -->
|
||||
<padding
|
||||
android:left="8dp"
|
||||
android:top="4dp"
|
||||
android:right="8dp"
|
||||
android:bottom="4dp" />
|
||||
</shape>
|
||||
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFEAD1AE"/>
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_selected="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFD700"/>
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#00000000"/> <!-- Transparent -->
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 第一层:绿色背景方框 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#4CAF50" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<!-- 第二层:白色对勾 (使用系统自带的对勾图案) -->
|
||||
<item
|
||||
android:drawable="@android:drawable/checkbox_on_background"
|
||||
android:top="2dp"
|
||||
android:bottom="2dp"
|
||||
android:left="2dp"
|
||||
android:right="2dp" />
|
||||
</layer-list>
|
||||
@ -0,0 +1,15 @@
|
||||
<?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="2dp"
|
||||
android:color="#BDBDBD" />
|
||||
<!-- 圆角处理 -->
|
||||
<corners android:radius="4dp" />
|
||||
<size
|
||||
android:width="20dp"
|
||||
android:height="20dp" />
|
||||
</shape>
|
||||
@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="32dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@color/main_background_gray">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/icon_app"
|
||||
android:layout_marginBottom="32dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="小米便签"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/primary_text_black"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="48dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:hint="电子邮箱"
|
||||
android:inputType="textEmailAddress"
|
||||
android:paddingLeft="16dp"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:hint="密码"
|
||||
android:inputType="textPassword"
|
||||
android:paddingLeft="16dp"
|
||||
android:background="@android:drawable/editbox_background_normal"
|
||||
android:layout_marginBottom="24dp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:text="登录 / 注册"
|
||||
android:backgroundTint="@color/mi_gold"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading_bar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="12dp"
|
||||
android:background="@drawable/bg_agenda_item_selector"> <!-- 需定义点击波纹 -->
|
||||
|
||||
<!-- 左侧 1/4 区域:清单符 + 时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 清单符 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_agenda_check"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/checkbox_unchecked" /> <!-- 需准备白色方块和绿色对勾图标 -->
|
||||
|
||||
<!-- 时间标签 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_agenda_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:text="16:00"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#666666"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右侧 3/4 区域:事项内容 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_agenda_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3"
|
||||
android:text="去机场接导师"
|
||||
android:textSize="16sp"
|
||||
android:textColor="#333333"
|
||||
android:paddingLeft="12dp"/>
|
||||
|
||||
<!-- 删除按钮 (默认隐藏,侧滑或长按显示,这里简单起见放最右侧) -->
|
||||
<ImageView
|
||||
android:id="@+id/btn_agenda_delete"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@android:drawable/ic_menu_delete"
|
||||
android:alpha="0.3"
|
||||
android:padding="4dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tv_folder_tab_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/bg_folder_tab_selector"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:textColor="@color/primary_text_black"
|
||||
android:textSize="14sp"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="#FFFFFF">
|
||||
|
||||
<!-- 1. 日历 -->
|
||||
<CalendarView
|
||||
android:id="@+id/calendar_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="320dp"
|
||||
android:background="#F9F9F9" />
|
||||
|
||||
<!-- 2. 日期标题 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:background="#F0F0F0"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View android:layout_width="4dp" android:layout_height="24dp" android:background="@color/mi_gold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_agenda_date_header"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#333333"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
<!-- [新增] 切换按钮 -->
|
||||
<ImageButton
|
||||
android:id="@+id/btn_toggle_calendar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:src="@android:drawable/arrow_up_float"
|
||||
android:contentDescription="收起日历" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 3. 列表区域 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/agenda_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- [核心 ID] 空状态容器 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_empty_state"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
<ImageView
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:src="@android:drawable/ic_menu_today"
|
||||
android:alpha="0.2" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无日程安排"
|
||||
android:textColor="#CCCCCC" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 4. 快速添加栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp"
|
||||
android:background="#F5F5F5"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- [新增] 时间选择按钮 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_set_quick_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全天"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/mi_gold"
|
||||
android:textStyle="bold"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_quick_add"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:hint="快速添加今日事项..."
|
||||
android:textSize="14sp"
|
||||
android:background="@null"
|
||||
android:padding="10dp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_quick_add"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="添加"
|
||||
style="?android:attr/borderlessButtonStyle" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/nav_notes"
|
||||
android:icon="@android:drawable/ic_menu_edit"
|
||||
android:title="便签" />
|
||||
<item
|
||||
android:id="@+id/nav_agenda"
|
||||
android:icon="@android:drawable/ic_menu_today"
|
||||
android:title="日程" />
|
||||
<item
|
||||
android:id="@+id/nav_ai"
|
||||
android:icon="@android:drawable/ic_menu_view"
|
||||
android:title="AI助手" />
|
||||
</menu>
|
||||
Loading…
Reference in new issue