From 087a8daa68c681faf0cb8eda9ae18456b5c68166 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 06 四月 2021 17:47:29 +0800
Subject: [PATCH] 3.9.0正式版本

---
 BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java
index 24a105e..062d712 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java
@@ -189,6 +189,7 @@
     private CirclePageIndicator indicator_recommend;
     private boolean isLoad;
     private View loading;
+    private View noMoreDataView;
 
     private void initHomeAd() {
         View view = LayoutInflater.from(getContext()).inflate(R.layout.recommend_top, null);
@@ -253,6 +254,9 @@
         loading = LayoutInflater.from(getContext()).inflate(R.layout.item_loading, null);
         loading.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
         loading.setVisibility(View.GONE);
+
+        noMoreDataView = LayoutInflater.from(getContext()).inflate(R.layout.item_no_more_data_view, null);
+        noMoreDataView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
 
 
         rv_recommend.addOnScrollListener(new RecyclerView.OnScrollListener() {
@@ -798,6 +802,14 @@
                                         .getJSONArray("data").toString());
                                 editor.commit();
                             }
+                            //鍒锋柊
+                            if (page == 1) {
+                                mRecommendNewAdapter.setFooterView(loading);
+                            }
+
+                            if (mHomeTypes.size() >= homeTypeCount) {
+                                mRecommendNewAdapter.removeFooterView();
+                            }
                             mRecommendNewAdapter.notifyDataSetChanged();
                         }
                     }

--
Gitblit v1.8.0