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 a9acf35..f67411d 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -345,24 +345,30 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene if (mMainHomeCommunityViewHolder != null) { mMainHomeCommunityViewHolder.onPauseVideo(); } + floatBanner.setVisibility(View.GONE); break; case 1: MobclickAgent.onEvent(mContext, "community", "直播"); if (mMainHomeCommunityViewHolder != null) { mMainHomeCommunityViewHolder.onResumePlay(); } + if (anchorRecommendModel != null && anchorRecommendModel.getList().size() > 2) { + floatBanner.setVisibility(View.VISIBLE); + } break; case 2: MobclickAgent.onEvent(mContext, "information", "消息"); if (mMainHomeCommunityViewHolder != null) { mMainHomeCommunityViewHolder.onPauseVideo(); } + floatBanner.setVisibility(View.GONE); break; case 3: MobclickAgent.onEvent(mContext, "my", "我的"); if (mMainHomeCommunityViewHolder != null) { mMainHomeCommunityViewHolder.onPauseVideo(); } + floatBanner.setVisibility(View.GONE); break; } if (mTabButtonGroup.getCurPosition() != position) { @@ -627,6 +633,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene } + AnchorRecommendModel anchorRecommendModel; + /** * 首页推荐位 */ @@ -640,6 +648,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public void onSuccess(AnchorRecommendModel data) { if (isFinishing()) return; + anchorRecommendModel = data; if (data.getListShow() == 1 && data.getList().size() > 2) { floatBanner.setVisibility(View.VISIBLE); findViewById(R.id.banner_click).setVisibility(View.VISIBLE); @@ -1355,7 +1364,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene mTabButtonGroup.setCurPosition(event.getPage()); if (event.getPage() == 0) { isfloatBannernet = true; - initAnchorRecommendBanner(); + //initAnchorRecommendBanner(); } else { isfloatBannernet = false; floatBanner.setVisibility(View.GONE); @@ -1515,7 +1524,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene if (event.isFloatWarOrder()) { floatWarOrder.setVisibility(View.GONE); } else { - floatWarOrder.setVisibility(View.VISIBLE); + if (anchorRecommendModel != null && anchorRecommendModel.getShowWarOrder() == 1) { + floatWarOrder.setVisibility(View.VISIBLE); + } } } diff --git a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java index f1eb0b8..3eb16e9 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMessageViewHolder.java @@ -136,10 +136,9 @@ public class MainMessageViewHolder extends AbsMainViewHolder { search = findViewById(R.id.search); contacts.setOnClickListener(view -> { //通讯录 - //RouteUtil.forwardActivity(RouteUtil.PATH_ADDRESSBOOK); + RouteUtil.forwardActivity(RouteUtil.PATH_ADDRESSBOOK); // mContext.startActivity(new Intent(mContext, com.yunbao.main.activity.CompleteUserInfoActivity.class)); // mContext.startActivity(new Intent(mContext, MessageHiConfigRecordActivity.class)); - ToastUtil.show(WordUtil.isNewZh()+""); }); search.addTextChangedListener(new TextWatcher() { @Override