|
|
@@ -79,14 +79,15 @@ import com.sheep.gamegroup.util.MyListview;
|
|
|
import com.sheep.gamegroup.util.SysAppUtil;
|
|
|
import com.sheep.gamegroup.util.TestUtil;
|
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
|
+import com.sheep.gamegroup.util.ViewHolder;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
import com.sheep.gamegroup.view.activity.NotificationsUtils;
|
|
|
+import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
|
|
|
import com.sheep.gamegroup.view.adapter.AdpHomeListGrideview;
|
|
|
import com.sheep.gamegroup.view.adapter.AdpHomeListListview;
|
|
|
import com.sheep.gamegroup.view.adapter.AdpTryMakemoney;
|
|
|
import com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp;
|
|
|
import com.sheep.gamegroup.view.dialog.DialogNewbieTaskList;
|
|
|
-import com.sheep.gamegroup.view.fragment.FgtPlayGameSon;
|
|
|
import com.sheep.gamegroup.view.fragment.FgtTryMakeMoney;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
@@ -186,6 +187,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
TextView homepage_item_juan_tv;
|
|
|
@BindView(R.id.recyclerview_line)
|
|
|
View recyclerview_line;
|
|
|
+ @BindView(R.id.full_home_list_rv)
|
|
|
+ RecyclerView full_home_list_rv;
|
|
|
@BindView(R.id.bottom_line_text)
|
|
|
TextView bottom_line_text;
|
|
|
|
|
|
@@ -207,6 +210,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
private List<BulletinEnty> bulletinEntyLists = new ArrayList<>();
|
|
|
|
|
|
private List<HomeListEntity> homeListEntitys = new ArrayList<>();
|
|
|
+ private List<HomeListEntity> fullHomeList = new ArrayList<>();
|
|
|
private List<HomeListEntity> homeListEntitysGridview = new ArrayList<>();
|
|
|
private List<HomeListEntity> homeListEntitysListview = new ArrayList<>();
|
|
|
private AdpHomeListGrideview adpHomeListGrideview;
|
|
|
@@ -590,6 +594,28 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
});
|
|
|
CommonUtil.getInstance().reflex(tabLayout, activity);
|
|
|
setAnimation(ivDuty);
|
|
|
+ //只显示图片并且充满的homeList
|
|
|
+ full_home_list_rv.setHasFixedSize(true);
|
|
|
+ full_home_list_rv.setNestedScrollingEnabled(false);
|
|
|
+ full_home_list_rv.setLayoutManager(new LinearLayoutManager(activity));
|
|
|
+ full_home_list_rv.setAdapter(new AdbCommonRecycler<HomeListEntity>(activity, fullHomeList){
|
|
|
+ @Override
|
|
|
+ public int getViewIdByType(int type) {
|
|
|
+ return R.layout.item_image_full_home_list;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void convert(ViewHolder holder, final HomeListEntity item) {
|
|
|
+ ImageView imageView = holder.getView(R.id.image);
|
|
|
+ GlideImageLoader.setImage(imageView, item.getIcon());
|
|
|
+ imageView.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View view) {
|
|
|
+ CommonUtil.getInstance().goWhere(activity, item, "首页");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
private int curPosition = 0;
|
|
|
@@ -729,9 +755,11 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
List<HomeListEntity> cacheHomeListEtyList = DataUtil.getInstance().getCacheList(ApiKey.home_list, HomeListEntity.class);
|
|
|
if (ListUtil.isEmpty(cacheHomeListEtyList)) {
|
|
|
home_list_gridview_layout.setVisibility(View.GONE);
|
|
|
+ full_home_list_rv.setVisibility(View.GONE);
|
|
|
} else {
|
|
|
home_list_gridview_layout.setVisibility(View.VISIBLE);
|
|
|
- homeListEntitys.addAll(cacheHomeListEtyList);
|
|
|
+ CommonUtil.getInstance().splitHomeList(cacheHomeListEtyList, homeListEntitys, fullHomeList);
|
|
|
+ full_home_list_rv.setVisibility(fullHomeList.isEmpty() ? View.GONE : View.VISIBLE);
|
|
|
boolean isShowQB = false;
|
|
|
boolean isShowMd = false;
|
|
|
for (int i = 0; i < homeListEntitys.size(); i++) {
|
|
|
@@ -751,6 +779,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
addNewTask();
|
|
|
SheepApp.getInstance().setShowQB(isShowQB);
|
|
|
SheepApp.getInstance().setShowMidong(isShowMd);
|
|
|
+ full_home_list_rv.getAdapter().notifyDataSetChanged();
|
|
|
adpHomeListGrideview.notifyDataSetChanged();
|
|
|
adpHomeListListview.notifyDataSetChanged();
|
|
|
home_list_gridview_listview.setVisibility(homeListEntitysListview.isEmpty() ? View.GONE : View.VISIBLE);
|
|
|
@@ -1090,7 +1119,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
homeListEntitys.clear();
|
|
|
homeListEntitysGridview.clear();
|
|
|
homeListEntitysListview.clear();
|
|
|
- homeListEntitys.addAll(homeListEntityList);
|
|
|
+ CommonUtil.getInstance().splitHomeList(homeListEntityList, homeListEntitys, fullHomeList);
|
|
|
boolean isShowQB = false;
|
|
|
boolean isShowMd = false;
|
|
|
for (int i = 0; i < homeListEntitys.size(); i++) {
|
|
|
@@ -1110,6 +1139,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
addNewTask();
|
|
|
SheepApp.getInstance().setShowQB(isShowQB);
|
|
|
SheepApp.getInstance().setShowMidong(isShowMd);
|
|
|
+ full_home_list_rv.getAdapter().notifyDataSetChanged();
|
|
|
adpHomeListGrideview.notifyDataSetChanged();
|
|
|
adpHomeListListview.notifyDataSetChanged();
|
|
|
home_list_gridview_listview.setVisibility(homeListEntitysListview.isEmpty() ? View.GONE : View.VISIBLE);
|