|
|
@@ -13,6 +13,7 @@ import com.sheep.gamegroup.model.entity.GameEntity;
|
|
|
import com.sheep.gamegroup.model.entity.GameEntityList;
|
|
|
import com.sheep.gamegroup.util.CommonUtil;
|
|
|
import com.sheep.gamegroup.util.ListUtil;
|
|
|
+import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.gamegroup.view.adapter.PlayGameListAdapter;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
|
|
|
@@ -30,6 +31,29 @@ import rx.Observable;
|
|
|
public class FgtPlayGameSon extends BaseListFragment3<GameEntity> {
|
|
|
private int type;
|
|
|
|
|
|
+ //第一次就展示在viewpager中的页面
|
|
|
+ public boolean firstPage = false;
|
|
|
+
|
|
|
+ public void setFirstPage(boolean firstPage) {
|
|
|
+ this.firstPage = firstPage;
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ protected void initDataOnVisibleToUser() {
|
|
|
+ if(activity == null)
|
|
|
+ onViewCreated();
|
|
|
+ if(!firstPage && firstVisibleToUser) {
|
|
|
+ refreshData();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int refreshDataType() {
|
|
|
+ if(firstPage){
|
|
|
+ return REFRESH_ON_CREATE;
|
|
|
+ }
|
|
|
+ return REFRESH_ON_YOURSELF;
|
|
|
+ }
|
|
|
+
|
|
|
public static FgtPlayGameSon newInstance(int type){
|
|
|
FgtPlayGameSon fgt = new FgtPlayGameSon();
|
|
|
Bundle bundle = new Bundle();
|