Эх сурвалжийг харах

添加工作进度页面基础和部分控件

Frankensteinly 10 сар өмнө
parent
commit
ecdb8d83e4

+ 23 - 0
app/src/main/java/com/grkj/iscs/view/fragment/JobProgressFragment.kt

@@ -0,0 +1,23 @@
+package com.grkj.iscs.view.fragment
+
+import com.grkj.iscs.databinding.FragmentJobProgressBinding
+import com.grkj.iscs.view.base.BaseMvpFragment
+import com.grkj.iscs.view.iview.IJobProgressVIew
+import com.grkj.iscs.view.presenter.JobProgressPresenter
+
+/**
+ * 作业票工作进度页
+ */
+class JobProgressFragment : BaseMvpFragment<IJobProgressVIew, JobProgressPresenter, FragmentJobProgressBinding>() {
+
+    override val viewBinding: FragmentJobProgressBinding
+        get() = FragmentJobProgressBinding.inflate(layoutInflater)
+
+    override fun initView() {
+
+    }
+
+    override fun initPresenter(): JobProgressPresenter {
+        return JobProgressPresenter()
+    }
+}

+ 6 - 0
app/src/main/java/com/grkj/iscs/view/iview/IJobProgressVIew.kt

@@ -0,0 +1,6 @@
+package com.grkj.iscs.view.iview
+
+import com.grkj.iscs.view.base.IView
+
+interface IJobProgressVIew : IView {
+}

+ 7 - 0
app/src/main/java/com/grkj/iscs/view/presenter/JobProgressPresenter.kt

@@ -0,0 +1,7 @@
+package com.grkj.iscs.view.presenter
+
+import com.grkj.iscs.view.base.BasePresenter
+import com.grkj.iscs.view.iview.IJobProgressVIew
+
+class JobProgressPresenter : BasePresenter<IJobProgressVIew>() {
+}

+ 59 - 0
app/src/main/res/layout/fragment_job_progress.xml

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context=".view.fragment.JobProgressFragment">
+
+    <TextView
+        android:id="@+id/tv_title"
+        style="@style/CommonTextView" />
+
+    <TextView
+        android:id="@+id/tv_worker"
+        style="@style/CommonTextView"
+        android:layout_alignParentRight="true" />
+
+    <ImageView
+        android:id="@+id/iv_worker"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toLeftOf="@id/tv_worker" />
+
+    <TextView
+        android:id="@+id/tv_lock"
+        style="@style/CommonTextView"
+        android:layout_toLeftOf="@id/iv_worker" />
+
+    <ImageView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toLeftOf="@id/tv_lock" />
+
+    <TextView
+        android:id="@+id/tv_back"
+        style="@style/CommonBtn"
+        android:layout_alignParentRight="true"
+        android:layout_alignParentBottom="true"
+        android:text="@string/back" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_above="@id/tv_back"
+        android:layout_below="@id/tv_title"
+        android:orientation="horizontal">
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_point"
+            style="@style/CommonRecyclerView"
+            android:layout_width="0dp"
+            android:layout_weight="1" />
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_worker"
+            style="@style/CommonRecyclerView"
+            android:layout_width="0dp"
+            android:layout_weight="1" />
+    </LinearLayout>
+</RelativeLayout>

+ 31 - 0
app/src/main/res/layout/item_rv_point.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/root"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal">
+
+    <TextView
+        android:id="@+id/tv_name"
+        style="@style/CommonTextView"
+        android:layout_width="0dp"
+        android:layout_weight="1" />
+
+    <TextView
+        android:id="@+id/tv_function"
+        style="@style/CommonTextView"
+        android:layout_width="0dp"
+        android:layout_weight="1" />
+
+    <ImageView
+        android:id="@+id/iv_status"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1" />
+
+    <TextView
+        android:id="@+id/tv_lock_status"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1" />
+</LinearLayout>

+ 31 - 0
app/src/main/res/layout/item_rv_worker.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/root"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal">
+
+    <TextView
+        android:id="@+id/tv_name"
+        style="@style/CommonTextView"
+        android:layout_width="0dp"
+        android:layout_weight="2" />
+
+    <ImageView
+        android:id="@+id/iv_status_prepare"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1" />
+
+    <ImageView
+        android:id="@+id/tiv_status_locked"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1" />
+
+    <ImageView
+        android:id="@+id/iv_status_unlocked"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1" />
+</LinearLayout>