|
@@ -200,12 +200,6 @@ public class FgtPlayGame extends BaseFragment {
|
|
|
banner.stopAutoPlay();
|
|
banner.stopAutoPlay();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
- public void onResume() {
|
|
|
|
|
- super.onResume();
|
|
|
|
|
- initData();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
private void bindBanner() {
|
|
private void bindBanner() {
|
|
|
//结束轮播
|
|
//结束轮播
|
|
|
banner.stopAutoPlay();
|
|
banner.stopAutoPlay();
|
|
@@ -238,7 +232,6 @@ public class FgtPlayGame extends BaseFragment {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void initData(){
|
|
private void initData(){
|
|
|
-
|
|
|
|
|
//轮播
|
|
//轮播
|
|
|
List<SlideshowEty> cacheSlideshowEtyList = DataUtil.getInstance().getCacheList(ApiKey.slideshowGame, SlideshowEty.class);
|
|
List<SlideshowEty> cacheSlideshowEtyList = DataUtil.getInstance().getCacheList(ApiKey.slideshowGame, SlideshowEty.class);
|
|
|
if (ListUtil.isEmpty(cacheSlideshowEtyList)) {
|
|
if (ListUtil.isEmpty(cacheSlideshowEtyList)) {
|
|
@@ -358,11 +351,15 @@ public class FgtPlayGame extends BaseFragment {
|
|
|
if (!ListUtil.isEmpty(newList)) {
|
|
if (!ListUtil.isEmpty(newList)) {
|
|
|
list.clear();
|
|
list.clear();
|
|
|
ListUtil.addAll(list, newList);
|
|
ListUtil.addAll(list, newList);
|
|
|
|
|
+ int position = 0;
|
|
|
for(FindTag findTag:list){
|
|
for(FindTag findTag:list){
|
|
|
FgtPlayGameSon item = FgtPlayGameSon.newInstance(findTag.getId());
|
|
FgtPlayGameSon item = FgtPlayGameSon.newInstance(findTag.getId());
|
|
|
item.setViewPager(pager);
|
|
item.setViewPager(pager);
|
|
|
item.setSmartRefreshLayout(refresh);
|
|
item.setSmartRefreshLayout(refresh);
|
|
|
|
|
+ if(position == 0)
|
|
|
|
|
+ item.setFirstPage(true);
|
|
|
mAdapter.add(item, findTag.getName());
|
|
mAdapter.add(item, findTag.getName());
|
|
|
|
|
+ position ++;
|
|
|
}
|
|
}
|
|
|
pager.setAdapter(mAdapter);
|
|
pager.setAdapter(mAdapter);
|
|
|
indicator.setupWithViewPager(pager);
|
|
indicator.setupWithViewPager(pager);
|