From e102578ebfc95c27aeb13dce13fb82af53a2bead Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 25 二月 2021 17:07:23 +0800
Subject: [PATCH] 1. 新增夜间施工查询界面 2. 新增夜间施工管理统计界面

---
 app/src/main/java/cn/flightfeather/thirdapp/view/recyclerview/RecyclerViewSetInterface.kt |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/app/src/main/java/cn/flightfeather/thirdapp/view/recyclerview/RecyclerViewSetInterface.kt b/app/src/main/java/cn/flightfeather/thirdapp/view/recyclerview/RecyclerViewSetInterface.kt
index 6025ae3..095e079 100644
--- a/app/src/main/java/cn/flightfeather/thirdapp/view/recyclerview/RecyclerViewSetInterface.kt
+++ b/app/src/main/java/cn/flightfeather/thirdapp/view/recyclerview/RecyclerViewSetInterface.kt
@@ -5,6 +5,8 @@
 import android.view.ViewGroup
 import com.chad.library.adapter.base.BaseQuickAdapter
 import com.chad.library.adapter.base.BaseViewHolder
+import com.chad.library.adapter.base.loadmore.LoadMoreView
+import com.chad.library.adapter.base.loadmore.SimpleLoadMoreView
 
 /**
  * @author riku
@@ -65,7 +67,7 @@
             //璁剧疆绌哄竷灞�
             getMyLoadingView()?.let { emptyView = it }
 
-//            setLoadMoreView(SimpleLoadMoreView())
+            getLoadMoreView()?.let { setLoadMoreView(it)}
         }
         //鍔犺浇鏇村
         setLoadMore()
@@ -117,7 +119,7 @@
     /**
      * 灏嗗垪琛ㄦ暟鎹浛鎹㈡垚鏂扮殑鏁版嵁
      */
-    fun setNewData(dataList: ArrayList<T>) {
+    fun setNewData(dataList: List<T>) {
         val resultList = convertToSection(dataList)
         addSection(resultList)
         adapter?.setNewData(resultList)
@@ -127,14 +129,14 @@
     /**
      * 鍦ㄥ師鏁版嵁鍩虹涓婃坊鍔犳柊鏁版嵁
      */
-    fun addData(dataList: ArrayList<T>) {
+    fun addData(dataList: List<T>) {
         val resultList = convertToSection(dataList)
         addSection(resultList)
         adapter?.addData(resultList)
         onDataUpdated(adapter)
     }
 
-    fun addData(pos: Int, dataList: ArrayList<T>){
+    fun addData(pos: Int, dataList: List<T>){
         val resultList = convertToSection(dataList)
         addSection(resultList)
         adapter?.addData(pos, resultList)
@@ -197,10 +199,10 @@
     fun getSectionLayoutId(): Int
 
     //鑷畾涔夋槸鍚﹂渶瑕佹坊鍔犲垪琛ㄥ垎缁�
-    fun addSection(dataList: ArrayList<MySection<T>>) = Unit
+    fun addSection(dataList: MutableList<MySection<T>>) = Unit
 
     //灏嗘暟鎹浆鎹负鍒楄〃鑳芥帴鍙楃殑鍥哄畾缁撴瀯
-    fun convertToSection(list: ArrayList<T>): ArrayList<MySection<T>> = MySection.convert2Section(list)
+    fun convertToSection(list: List<T>): MutableList<MySection<T>> = MySection.convert2Section(list)
 
     //鏁版嵁鏇存柊缁撴潫
     fun onDataUpdated(adapter: BaseRecyclerAdapter<T>?, pos: Int? = null) = Unit
@@ -260,6 +262,9 @@
     //鑾峰彇绌哄竷灞�
     fun getMyLoadFailView(): View? = null
 
+    //鑾峰彇鍔犺浇甯冨眬
+    fun getLoadMoreView(): LoadMoreView? = null
+
     //鍒嗗壊绾�
     fun getDivider(): RecyclerView.ItemDecoration? = null
 

--
Gitblit v1.9.3