浏览代码

物资取还页补充部分布局

Frankensteinly 8 月之前
父节点
当前提交
fddb680671

+ 11 - 0
app/src/main/java/com/grkj/iscs_mc/view/fragment/MaterialFetchReturnFragment.kt

@@ -1,9 +1,13 @@
 package com.grkj.iscs_mc.view.fragment
 
+import com.grkj.iscs_mc.R
 import com.grkj.iscs_mc.databinding.FragmentMaterialFetchReturnBinding
+import com.grkj.iscs_mc.extentions.navigateUp
 import com.grkj.iscs_mc.view.base.BaseMvpFragment
 import com.grkj.iscs_mc.view.iview.IMaterialFetchReturnView
 import com.grkj.iscs_mc.view.presenter.MaterialFetchReturnPresenter
+import com.zhy.adapter.recyclerview.CommonAdapter
+import com.zhy.adapter.recyclerview.base.ViewHolder
 
 /**
  * 物资管理 - 物资取还
@@ -15,7 +19,14 @@ class MaterialFetchReturnFragment :
         get() = FragmentMaterialFetchReturnBinding.inflate(layoutInflater)
 
     override fun initView() {
+        mBinding?.cbBack?.setOnClickListener { navigateUp() }
 
+        mBinding?.rvFetchReturn?.adapter = object :
+            CommonAdapter<String>(requireContext(), R.layout.item_rv_replacement, mutableListOf()) {
+            override fun convert(holder: ViewHolder, t: String, position: Int) {
+
+            }
+        }
     }
 
     override fun initPresenter(): MaterialFetchReturnPresenter {

+ 33 - 2
app/src/main/res/layout/fragment_material_fetch_return.xml

@@ -1,8 +1,39 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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="match_parent"
     tools:context=".view.fragment.MaterialFetchReturnFragment">
 
-</FrameLayout>
+    <com.grkj.iscs_mc.view.widget.TitleBar
+        android:id="@+id/tb"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:bar_icon="@mipmap/material_fetch_return"
+        app:bar_title="@string/material_fetch_return" />
+
+    <com.grkj.iscs_mc.view.widget.CommonBtn
+        android:id="@+id/cb_back"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_alignParentBottom="true"
+        app:btn_bg="@drawable/common_btn_blue_bg"
+        app:btn_name="@string/back" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_above="@id/cb_back"
+        android:layout_below="@id/tb"
+        android:layout_marginVertical="@dimen/common_spacing"
+        android:orientation="horizontal">
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/rv_fetch_return"
+            style="@style/CommonRecyclerView"
+            app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
+            app:spanCount="6" />
+    </LinearLayout>
+</RelativeLayout>