增加任务列表和下载功能

This commit is contained in:
squallzhjch
2023-04-23 16:35:45 +08:00
parent ccfd30228e
commit a1170db7a9
35 changed files with 1083 additions and 137 deletions

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/cv_bg_color"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
tools:context="com.navinfo.omqs.ui.fragment.tasklist.TaskListAdapter">
<TextView
android:id="@+id/task_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="省市名称"
android:textColor="@color/white"
android:textSize="@dimen/default_font_size" />
<TextView
android:id="@+id/task_size"
style="@style/map_size_font_style"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/task_name"
android:drawableLeft="@mipmap/point_blue"
android:layout_marginTop="5dp"
android:text="文件大小"
android:textSize="@dimen/card_title_font_3size" />
<TextView
android:id="@+id/task_download_btn"
style="@style/map_download_style_btn"
android:layout_width="60dp"
android:layout_alignTop="@id/task_name"
android:layout_alignBottom="@id/task_size"
android:layout_alignParentRight="true"
android:shadowColor="@android:color/transparent"
android:text="下载"
android:textColor="@color/btn_blue_solid"
android:textSize="@dimen/card_title_font_2size" />
<TextView
android:id="@+id/task_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginBottom="10dp"
android:layout_toLeftOf="@id/task_download_btn"
android:clickable="true"
android:focusable="false"
android:shadowColor="@android:color/transparent"
android:textColor="@color/white"
android:textSize="@dimen/card_title_font_2size" />
<com.navinfo.omqs.ui.widget.MyProgressBar
android:id="@+id/task_progress"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="16dp"
android:layout_below="@id/task_download_btn"
android:progressDrawable="@drawable/progress_bg"
android:paddingTop="10dp"
android:visibility="invisible" />
</RelativeLayout>

View File

@@ -59,7 +59,7 @@
<TextView
android:id="@+id/evaluation_class_type"
text="@{viewModel.liveDataQsRecordBean.classType}"
android:text="@{viewModel.liveDataQsRecordBean.classType}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
@@ -68,7 +68,7 @@
<TextView
android:id="@+id/evaluation_problem_type"
text="@{viewModel.liveDataQsRecordBean.problemType}"
android:text="@{viewModel.liveDataQsRecordBean.problemType}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
@@ -77,7 +77,7 @@
<TextView
android:id="@+id/evaluation_phenomenon"
text="@{viewModel.liveDataQsRecordBean.phenomenon}"
android:text="@{viewModel.liveDataQsRecordBean.phenomenon}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
@@ -86,7 +86,7 @@
<TextView
android:id="@+id/evaluation_link"
text="@{viewModel.liveDataQsRecordBean.problemLink}"
android:text="@{viewModel.liveDataQsRecordBean.problemLink}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
@@ -95,13 +95,28 @@
<TextView
android:id="@+id/evaluation_cause"
text="@{viewModel.liveDataQsRecordBean.cause}"
android:text="@{viewModel.liveDataQsRecordBean.cause}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:onClick="@{fragment.onClick}"
android:background="@drawable/fm_card_map_down_status_bg" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="备注信息" />
<com.navinfo.omqs.ui.widget.MyEditeText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入备注信息"
android:gravity="start"
android:maxLines="3"
android:lines="3"
android:text="@={viewModel.liveDataQsRecordBean.description}"
android:inputType="textMultiLine"
android:background="@drawable/fm_card_map_down_status_bg"
/>
<!-- <com.google.android.material.tabs.TabLayout-->
<!-- android:id="@+id/evaluation_class_tab_layout"-->
<!-- android:layout_width="match_parent"-->

View File

@@ -17,8 +17,10 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/offline_map_city_list_recyclerview"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="@id/offline_map_search" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/offline_map_search"
app:layout_constraintVertical_bias="0.0"
tools:layout_editor_absoluteX="0dp" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".ui.fragment.tasklist.TaskListFragment">
<EditText
android:id="@+id/task_search"
style="@style/input_blue_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="搜索"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/task_recyclerview"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/task_search"
app:layout_constraintVertical_bias="0.0"
tools:layout_editor_absoluteX="0dp" />
</androidx.constraintlayout.widget.ConstraintLayout>