首页任务选择改为两步式圆角弹层;新增按钮深色高对比;统计目标文案与热力图自适应
This commit is contained in:
9
src/main/res/drawable/bg_add_btn.xml
Normal file
9
src/main/res/drawable/bg_add_btn.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/ripple_surface">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="@color/icon_add_bg" />
|
||||
<stroke android:width="1dp" android:color="@color/icon_add_stroke" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
10
src/main/res/drawable/bg_pick_row.xml
Normal file
10
src/main/res/drawable/bg_pick_row.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="@color/ripple_surface">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/surface_alt" />
|
||||
<corners android:radius="12dp" />
|
||||
<stroke android:width="1dp" android:color="@color/card_stroke" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
@@ -52,9 +52,10 @@
|
||||
android:id="@+id/btnAdd"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="@drawable/bg_icon_btn"
|
||||
android:background="@drawable/bg_add_btn"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_plus"
|
||||
android:tint="@color/icon_add_fg"
|
||||
android:contentDescription="@string/add_project" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -237,14 +237,14 @@
|
||||
<com.focusbox.app.widget.HeatmapView
|
||||
android:id="@+id/heatmap"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="112dp"
|
||||
android:layout_height="168dp"
|
||||
android:layout_marginTop="8dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/heatLegend"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical" />
|
||||
|
||||
@@ -38,9 +38,10 @@
|
||||
android:id="@+id/btnAdd"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:background="@drawable/bg_icon_btn"
|
||||
android:background="@drawable/bg_add_btn"
|
||||
android:padding="10dp"
|
||||
android:src="@drawable/ic_plus"
|
||||
android:tint="@color/icon_add_fg"
|
||||
android:contentDescription="@string/add_task" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
53
src/main/res/layout/item_pick_row.xml
Normal file
53
src/main/res/layout/item_pick_row.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?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:minHeight="58dp"
|
||||
android:background="@drawable/bg_pick_row"
|
||||
android:paddingStart="14dp"
|
||||
android:paddingEnd="14dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/rowDot"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rowTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
style="@style/T.Body" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rowMeta"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
style="@style/T.Caption" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rowMark"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/ic_check"
|
||||
android:tint="@color/brand"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/done" />
|
||||
</LinearLayout>
|
||||
110
src/main/res/layout/sheet_pick_task.xml
Normal file
110
src/main/res/layout/sheet_pick_task.xml
Normal file
@@ -0,0 +1,110 @@
|
||||
<?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="vertical"
|
||||
android:background="@drawable/bg_sheet">
|
||||
|
||||
<!-- 拖拽把手:提示这是可下滑关闭的底部弹层 -->
|
||||
<View
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="4dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@color/divider" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:paddingTop="14dp"
|
||||
android:paddingBottom="22dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pickBack"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:background="@drawable/bg_icon_btn"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_back"
|
||||
android:tint="@color/text_secondary"
|
||||
android:contentDescription="@string/pick_back" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pickTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pick_project"
|
||||
style="@style/T.Title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pickStep"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
style="@style/T.Caption" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pickClose"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:background="@drawable/bg_icon_btn"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_close"
|
||||
android:tint="@color/text_secondary"
|
||||
android:contentDescription="@string/cancel" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pickHint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
style="@style/T.Meta" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/pickScroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="2dp"
|
||||
android:paddingBottom="2dp"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/pickList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" />
|
||||
</ScrollView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pickClear"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:background="@drawable/bg_btn_ghost"
|
||||
android:gravity="center"
|
||||
android:text="@string/clear_task"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -29,6 +29,11 @@
|
||||
<color name="segment_track">#262A2E</color>
|
||||
<color name="segment_on">#33383E</color>
|
||||
|
||||
<!-- 深色下用明显更亮的描边与加号,保证一眼能找到 -->
|
||||
<color name="icon_add_bg">#3C2A25</color>
|
||||
<color name="icon_add_stroke">#8A5140</color>
|
||||
<color name="icon_add_fg">#FFB49A</color>
|
||||
|
||||
<color name="ripple_surface">#1FFFFFFF</color>
|
||||
<color name="ripple_brand">#33FFFFFF</color>
|
||||
|
||||
|
||||
@@ -34,6 +34,11 @@
|
||||
<color name="segment_track">#EBE5DA</color>
|
||||
<color name="segment_on">#FFFFFF</color>
|
||||
|
||||
<!-- 新增按钮:独立配色,避免深色下 + 号与底色糊成一片 -->
|
||||
<color name="icon_add_bg">#F6DED6</color>
|
||||
<color name="icon_add_stroke">#E3B2A1</color>
|
||||
<color name="icon_add_fg">#9E3F29</color>
|
||||
|
||||
<color name="ripple_surface">#14000000</color>
|
||||
<color name="ripple_brand">#33FFFFFF</color>
|
||||
|
||||
|
||||
@@ -31,6 +31,14 @@
|
||||
<string name="current_task">当前任务</string>
|
||||
<string name="no_task">未选择任务 · 直接开始也可以</string>
|
||||
<string name="pick_task">选择任务</string>
|
||||
<string name="pick_project">选择项目</string>
|
||||
<string name="pick_back">返回上一步</string>
|
||||
<string name="clear_task">不选择任务,直接开始</string>
|
||||
<string name="pick_step">第 %1$d 步 / 共 2 步</string>
|
||||
<string name="pick_project_hint">先选项目,再从这个项目里挑一件要做的事</string>
|
||||
<string name="pick_task_hint">选中的任务会自动套用它设定的专注时长</string>
|
||||
<string name="pick_project_meta">%1$d 项待办</string>
|
||||
<string name="pick_task_empty">这个项目还没有待办任务,点返回换个项目</string>
|
||||
<string name="no_task_to_pick">还没有待办任务,先去「任务」新建一个</string>
|
||||
<string name="rounds_today">今天第 %1$d 个番茄</string>
|
||||
|
||||
@@ -101,6 +109,7 @@
|
||||
<string name="pomodoro_count">番茄数</string>
|
||||
<string name="completed_tasks">完成任务</string>
|
||||
<string name="goal_progress">今日目标 %1$d%%</string>
|
||||
<string name="goal_short">%1$dM</string>
|
||||
<string name="trend_title">专注趋势</string>
|
||||
<string name="heatmap_title">打卡热力图</string>
|
||||
<string name="distribution_title">项目分布</string>
|
||||
|
||||
Reference in New Issue
Block a user