直播结束,悬浮窗

This commit is contained in:
18401019693 2022-10-17 16:00:27 +08:00
parent 09f74c3881
commit 5bf95c28d2
2 changed files with 33 additions and 20 deletions

View File

@ -455,6 +455,12 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
if (index == 0) {
isfloatBannernet = true;
initAnchorRecommendBanner();
} else if (index == 2) {
floatBanner.setVisibility(View.GONE);
findViewById(R.id.banner_click).setVisibility(View.GONE);
isfloatBannernet = false;
if (mainMessageViewHolder != null)
mainMessageViewHolder.onResume();
} else {
floatBanner.setVisibility(View.GONE);
findViewById(R.id.banner_click).setVisibility(View.GONE);

View File

@ -99,6 +99,12 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
return R.layout.view_main_message;
}
@Override
public void onResume() {
super.onResume();
initData();
}
@Override
public void init() {
EventBus.getDefault().register(this);
@ -113,7 +119,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
imgNewsInteraction = (ImageView) findViewById(R.id.img_news_interaction);
imgNewsOnline = (ImageView) findViewById(R.id.img_news_online);
netHandler = new Handler();
initData();
}
@Override
@ -179,8 +185,6 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
@Override
public void run() {
netHandler.post(imUserInfoRunnable);
}
});
if (IMLoginManager.get(mContext).hintChat()) {
container.setVisibility(View.GONE);
ltNodataMsg.setVisibility(View.VISIBLE);
@ -201,6 +205,9 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
//获取一下系统通知
MessageIMManager.get(mContext).getSystemMessages();
}
});
}
/**