diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 59a8323..a9acf35 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -519,12 +519,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene //选中监听 mTabButtonGroup.addTabButtonGroupChangeListener((view, index) -> { - if (index == 0) { - floatBanner.setVisibility(View.GONE); - floatRedPacket.setVisibility(View.GONE); - floatWarOrder.setVisibility(View.GONE); - findViewById(R.id.banner_click).setVisibility(View.GONE); - isfloatBannernet = false; + if (index == 1) { + isfloatBannernet = true; + initAnchorRecommendBanner(); } else if (index == 2) { floatBanner.setVisibility(View.GONE); floatRedPacket.setVisibility(View.GONE); @@ -533,8 +530,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene isfloatBannernet = false; if (mainMessageViewHolder != null) mainMessageViewHolder.onResume(); } else { - isfloatBannernet = true; - initAnchorRecommendBanner(); + floatBanner.setVisibility(View.GONE); + floatRedPacket.setVisibility(View.GONE); + floatWarOrder.setVisibility(View.GONE); + findViewById(R.id.banner_click).setVisibility(View.GONE); + isfloatBannernet = false; } }); //获取指导员账号 @@ -545,20 +545,19 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene } private void showFirstLogin() { - LiveNetManager.get(mContext) - .isFirstLogin(new com.yunbao.common.http.base.HttpCallback() { - @Override - public void onSuccess(FirstLoginBean data) { - if (data.getStatus() == 0) { - mContext.startActivity(new Intent(mContext, CompleteUserInfoActivity.class)); - } - } + LiveNetManager.get(mContext).isFirstLogin(new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(FirstLoginBean data) { + if (data.getStatus() == 0) { + mContext.startActivity(new Intent(mContext, CompleteUserInfoActivity.class)); + } + } - @Override - public void onError(String error) { + @Override + public void onError(String error) { - } - }); + } + }); } /**