项目列表点击就地展开任务与统计,任务页零改动(v3.0)
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
<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:orientation="vertical"
|
||||
android:background="@drawable/bg_card"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
@@ -13,6 +12,15 @@
|
||||
android:paddingTop="14dp"
|
||||
android:paddingBottom="14dp">
|
||||
|
||||
<!-- 项目头:点击整行展开/收起任务列表 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/projectHeader"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<View
|
||||
android:id="@+id/colorBar"
|
||||
android:layout_width="4dp"
|
||||
@@ -63,4 +71,25 @@
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:src="@drawable/ic_more"
|
||||
android:contentDescription="@string/edit" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 展开区:该项目下添加过的任务(含已完成),默认收起 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/taskList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTaskEmpty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="18dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:text="@string/project_no_tasks"
|
||||
android:textColor="@color/text_tertiary"
|
||||
android:textSize="12sp"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
||||
56
src/main/res/layout/item_project_task.xml
Normal file
56
src/main/res/layout/item_project_task.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 项目卡展开后的任务行:结构与任务列表一致,但不显示分类(项目名),
|
||||
meta 改为「单轮时长 · 最近完成时间 · 累计完成次数」,右侧保留开始按钮。 -->
|
||||
<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:background="?attr/selectableItemBackground"
|
||||
android:paddingStart="18dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingTop="9dp"
|
||||
android:paddingBottom="9dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/taskColorBar"
|
||||
android:layout_width="3dp"
|
||||
android:layout_height="30dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="11dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTaskTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTaskMeta"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
style="@style/T.Caption" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnTaskPlay"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:padding="9dp"
|
||||
android:background="@drawable/bg_play_circle"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_play"
|
||||
android:contentDescription="@string/start" />
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user