diff --git a/config.gradle b/config.gradle index 3f66756b1..492fa93ba 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", //測試 - serverHost : "https://ceshi.yaoulive.com", +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 432d4cda9..1c9eaadac 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -404,12 +404,14 @@ public class LiveAudienceActivity extends LiveActivity { } }); mBanner.setClipToOutline(true); + //侧边栏 MainNetManager.get(mContext) .getHot(1, new com.yunbao.common.http.base.HttpCallback>() { @Override public void onSuccess(List data) { - onBanner(data); + runOnUiThread(() -> onBanner(data)); + } @Override 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 87dd0070f..21e454cd3 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -168,7 +168,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene private int messageNumber = 0, numberMe = 1; private ImageView waitingTip; private FloatBannerView floatBanner; - private boolean isfloatBannernet = true; + private boolean isfloatBannernet = true, isFirst = true; @Override @@ -422,9 +422,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene //选中监听 mTabButtonGroup.addTabButtonGroupChangeListener((view, index) -> { if (index == 0) { - floatBanner.setVisibility(View.VISIBLE); - findViewById(R.id.banner_click).setVisibility(View.VISIBLE); +// floatBanner.setVisibility(View.VISIBLE); +// findViewById(R.id.banner_click).setVisibility(View.VISIBLE); isfloatBannernet = true; + initAnchorRecommendBanner(); } else { floatBanner.setVisibility(View.GONE); findViewById(R.id.banner_click).setVisibility(View.GONE); @@ -698,8 +699,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene //获取指导员引导逻辑 NoviceInstructorManager.get(mContext).getNoviceInstructor(); NoviceInstructorManager.get(mContext).checktHomeZdyPop(); - initAnchorRecommendBanner(); - + if (!isFirst) { + initAnchorRecommendBanner(); + } } /** @@ -1084,9 +1086,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene mViewPager.setCurrentItem(event.getPage()); mTabButtonGroup.setCurPosition(event.getPage()); if (event.getPage() == 0) { - floatBanner.setVisibility(View.VISIBLE); - findViewById(R.id.banner_click).setVisibility(View.VISIBLE); + isfloatBannernet = true; + initAnchorRecommendBanner(); } else { + isfloatBannernet = false; floatBanner.setVisibility(View.GONE); findViewById(R.id.banner_click).setVisibility(View.GONE); } diff --git a/main/src/main/res/layout/view_homemain.xml b/main/src/main/res/layout/view_homemain.xml index d327824f8..544448e95 100644 --- a/main/src/main/res/layout/view_homemain.xml +++ b/main/src/main/res/layout/view_homemain.xml @@ -154,7 +154,7 @@ android:layout_alignParentRight="true" android:layout_marginRight="10dp" android:layout_marginBottom="10dp" - android:visibility="visible" /> + android:visibility="gone" />