From d0657262747a9924c2fff5f5edd96ce3cd033281 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 17 Aug 2023 18:20:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index aef7034c1..ffb61b6da 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -641,7 +641,8 @@ public class LiveGiftPopup extends AbsDialogFragment { if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { namingNameText.append("获取冠名:") .append(liveGiftModel.getNamingUserCoin()) - .append("个 "); + .append(" "); + } else { namingNameText.append("Get title: ") .append(liveGiftModel.getNamingUserCoin()) @@ -724,7 +725,7 @@ public class LiveGiftPopup extends AbsDialogFragment { if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { namingNameText.append("获取冠名:") .append(liveGiftModel.getNamingUserCoin()) - .append("个"); + .append(" "); } else { namingNameText.append("Get title: ") .append(liveGiftModel.getNamingUserCoin()); From 5afed0ee433b2ae9441fcc4e01b65a88c341ebb9 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 18 Aug 2023 11:04:21 +0800 Subject: [PATCH 2/4] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/dialog/LiveGiftPopup.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index ffb61b6da..b6a1df975 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -212,17 +212,18 @@ public class LiveGiftPopup extends AbsDialogFragment { } }); //;连送 - ViewClicksAntiShake.clicksAntiShake(mBtnSendGroup, new ViewClicksAntiShake.ViewClicksCallBack() { + mBtnSendGroup.setOnClickListener(new View.OnClickListener() { @Override - public void onViewClicks() { - sendGift(); + public void onClick(View v) { + sendGiftHandler.post(sendGiftRunnble); } }); + //送礼 ViewClicksAntiShake.clicksAntiShake(liveGiftSend, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - sendGift(); + sendGiftHandler.post(sendGiftRunnble); } }); @@ -506,6 +507,14 @@ public class LiveGiftPopup extends AbsDialogFragment { }); } + private Handler sendGiftHandler = new Handler(); + private Runnable sendGiftRunnble = new Runnable() { + @Override + public void run() { + sendGift(); + } + }; + /** * 赠送礼物 */ From 348dca8474298676ba7afb68ff2f1b362df8e1a2 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 18 Aug 2023 13:49:20 +0800 Subject: [PATCH 3/4] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/main/res/layout/dialog_live_gift_popup.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/res/layout/dialog_live_gift_popup.xml b/common/src/main/res/layout/dialog_live_gift_popup.xml index 9c96059d6..05b18ba17 100644 --- a/common/src/main/res/layout/dialog_live_gift_popup.xml +++ b/common/src/main/res/layout/dialog_live_gift_popup.xml @@ -95,7 +95,7 @@ @@ -221,7 +221,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_marginBottom="17dp" + android:layout_marginBottom="8dp" android:paddingStart="16dp"> Date: Fri, 18 Aug 2023 14:17:46 +0800 Subject: [PATCH 4/4] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/live/dialog/LiveGiftPopup.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index b6a1df975..b5feda359 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -86,6 +86,7 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.math.BigDecimal; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; @@ -449,11 +450,14 @@ public class LiveGiftPopup extends AbsDialogFragment { goldText.setText(coinModel.getGold()); diamondText.setText(coinModel.getCoin()); lvStr.setText("Lv." + coinModel.getUserLevel()); - int nextLeve = Integer.parseInt(coinModel.getUserNextLevelRewards()); - int maxLeve = Integer.parseInt(coinModel.getUserLevelMax()) + Integer.parseInt(coinModel.getUserLevelCurrentConsumption()); + findViewById(R.id.red_point).setVisibility((!TextUtils.isEmpty(coinModel.getUsersPackRedDot())) && TextUtils.equals(coinModel.getUsersPackRedDot(), "1") ? View.VISIBLE : View.GONE); if (!TextUtils.equals(coinModel.getUserLevel(), coinModel.getUserLevelMax())) { + int nextLeve = Integer.parseInt(coinModel.getUserNextLevelRewards()); + + + BigDecimal maxLeve = new BigDecimal(coinModel.getUserLevelMax()).add( new BigDecimal(coinModel.getUserLevelCurrentConsumption())); try { String leveNext = String.valueOf(nextLeve); String userNextLevel = coinModel.getUserLevelUpgrades(); @@ -488,7 +492,7 @@ public class LiveGiftPopup extends AbsDialogFragment { Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); leaveHint.setText(builder); progressBar.setProgress(nextLeve); - progressBar.setMax(maxLeve); + progressBar.setMax(maxLeve.intValue()); } catch (Exception e) { throw new RuntimeException(e); }