|
|
@@ -69,6 +69,7 @@ import com.sheep.gamegroup.util.MyDbManager;
|
|
|
import com.sheep.gamegroup.util.MyGridview;
|
|
|
import com.sheep.gamegroup.util.MyListview;
|
|
|
import com.sheep.gamegroup.util.PreferenceUtils;
|
|
|
+import com.sheep.gamegroup.util.SysAppUtil;
|
|
|
import com.sheep.gamegroup.util.TestUtil;
|
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
|
import com.sheep.gamegroup.view.activity.NotificationsUtils;
|
|
|
@@ -104,6 +105,7 @@ import butterknife.ButterKnife;
|
|
|
import butterknife.OnClick;
|
|
|
import butterknife.Unbinder;
|
|
|
import rx.android.schedulers.AndroidSchedulers;
|
|
|
+import rx.functions.Action1;
|
|
|
import rx.schedulers.Schedulers;
|
|
|
|
|
|
public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContract.View, TryMakeMoneyContract.View {
|
|
|
@@ -162,6 +164,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
MyListview home_list_gridview_listview;
|
|
|
@BindView(R.id.home_list_gridview_layout)
|
|
|
LinearLayout home_list_gridview_layout;
|
|
|
+ @BindView(R.id.check_net_ll)
|
|
|
+ View check_net_ll;
|
|
|
|
|
|
@Inject
|
|
|
SmallSheepPresenter pagePresenter;
|
|
|
@@ -309,7 +313,19 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
}
|
|
|
|
|
|
public void initData() {
|
|
|
-
|
|
|
+ SysAppUtil.checkNet(new Action1<Integer>() {
|
|
|
+ @Override
|
|
|
+ public void call(Integer result) {
|
|
|
+ if(result != 0){//无网络
|
|
|
+ check_net_ll.setVisibility(View.VISIBLE);
|
|
|
+ } else {
|
|
|
+ check_net_ll.setVisibility(View.GONE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ mInitData();
|
|
|
+ }
|
|
|
+ private void mInitData(){
|
|
|
if (upview1 != null) {
|
|
|
//停止滚动
|
|
|
upview1.stopFlipping();
|