From 52c561fa0812fcc3c30d13c994a6938e8b3b1f86 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 18 Jan 2024 18:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=98=E4=BB=A4=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/main/activity/MainActivity.java | 14 +++++++++----- main/src/main/res/layout/view_float_war_order.xml | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) 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 82ffbd9a0..5834fbab6 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -617,11 +617,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene @Override public void onSuccess(AnchorRecommendModel data) { if (isFinishing()) return; - if (data.getShowWarOrder() == 0) { - floatWarOrder.setVisibility(View.GONE); - } else { - floatWarOrder.setVisibility(View.VISIBLE); - } if (data.getListShow() == 1 && data.getList().size() > 2) { floatBanner.setVisibility(View.VISIBLE); findViewById(R.id.banner_click).setVisibility(View.VISIBLE); @@ -638,6 +633,15 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene ((ProgressBar) floatRedPacket.findViewById(R.id.progress)).setProgress(data.getRedPacketNum()); ((TextView) floatRedPacket.findViewById(R.id.progressText)).setText(data.getRedPacketNum() + "/" + data.getRedPacketTotal()); } + if (data.getShowWarOrder() == 0) { + floatWarOrder.setVisibility(View.GONE); + floatBanner.setVisibility(View.VISIBLE); + findViewById(R.id.banner_click).setVisibility(View.VISIBLE); + } else { + floatWarOrder.setVisibility(View.VISIBLE); + floatBanner.setVisibility(View.GONE); + findViewById(R.id.banner_click).setVisibility(View.GONE); + } } @Override diff --git a/main/src/main/res/layout/view_float_war_order.xml b/main/src/main/res/layout/view_float_war_order.xml index 27043564e..44690032c 100644 --- a/main/src/main/res/layout/view_float_war_order.xml +++ b/main/src/main/res/layout/view_float_war_order.xml @@ -4,6 +4,7 @@ android:layout_height="wrap_content">