From 7ce0bb3a7c48be01a28cf2668dc5259f5b74dc50 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Mon, 7 Aug 2023 15:18:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D#93=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/bean/FansGroupGiftPackInfo.java | 13 ++++++++++++- .../yunbao/live/dialog/LiveFansGroupBuyDialog.java | 11 +++++++---- live/src/main/res/values-en/strings.xml | 2 +- live/src/main/res/values/strings.xml | 2 +- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/bean/FansGroupGiftPackInfo.java b/common/src/main/java/com/yunbao/common/bean/FansGroupGiftPackInfo.java index c1a132ead..4c2c0de49 100644 --- a/common/src/main/java/com/yunbao/common/bean/FansGroupGiftPackInfo.java +++ b/common/src/main/java/com/yunbao/common/bean/FansGroupGiftPackInfo.java @@ -7,6 +7,8 @@ import java.util.List; public class FansGroupGiftPackInfo extends BaseModel { @SerializedName("id") private int id; + @SerializedName("pack_name") + private String packName; @SerializedName("description") private String description; @SerializedName("coin") @@ -17,6 +19,14 @@ public class FansGroupGiftPackInfo extends BaseModel { public FansGroupGiftPackInfo() { } + public String getPackName() { + return packName; + } + + public void setPackName(String packName) { + this.packName = packName; + } + public int getId() { return id; } @@ -51,8 +61,9 @@ public class FansGroupGiftPackInfo extends BaseModel { @Override public String toString() { - return "FansGroupGiftPack{" + + return "FansGroupGiftPackInfo{" + "id=" + id + + ", packName='" + packName + '\'' + ", description='" + description + '\'' + ", coin='" + coin + '\'' + ", data=" + data + diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveFansGroupBuyDialog.java b/live/src/main/java/com/yunbao/live/dialog/LiveFansGroupBuyDialog.java index ba6059d5e..8033d66fa 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveFansGroupBuyDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveFansGroupBuyDialog.java @@ -22,6 +22,7 @@ public class LiveFansGroupBuyDialog extends AbsDialogCenterPopupWindow { private TextView anchorName; private TextView buy; private TextView giftInfo; + private TextView giftName; private RecyclerView recyclerView; private LiveFansGroupBuyAdapter adapter; private String id; @@ -55,8 +56,8 @@ public class LiveFansGroupBuyDialog extends AbsDialogCenterPopupWindow { @Override public void buildDialog(XPopup.Builder builder) { - builder.popupWidth(DpUtil.dp2px(370)); - builder.maxWidth(DpUtil.dp2px(370)); + builder.popupWidth(DpUtil.dp2px(370)); + builder.maxWidth(DpUtil.dp2px(370)); } @Override @@ -69,9 +70,10 @@ public class LiveFansGroupBuyDialog extends AbsDialogCenterPopupWindow { super.onCreate(); anchorName = findViewById(R.id.anchorName); giftInfo = findViewById(R.id.giftInfo); + giftName = findViewById(R.id.giftName); buy = findViewById(R.id.buy); recyclerView = findViewById(R.id.giftList); - recyclerView.setLayoutManager(new LinearLayoutManager(mContext,LinearLayoutManager.HORIZONTAL,false){ + recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false) { @Override public boolean canScrollHorizontally() { return false; @@ -82,7 +84,7 @@ public class LiveFansGroupBuyDialog extends AbsDialogCenterPopupWindow { anchorName.setText(name); buy.setOnClickListener(v -> { LiveNetManager.get(mContext) - .buyFansExclusivePack(liveUid, id,mSteam, new HttpCallback() { + .buyFansExclusivePack(liveUid, id, mSteam, new HttpCallback() { @Override public void onSuccess(HttpCallbackModel data) { ToastUtil.show(data.getMsg()); @@ -103,6 +105,7 @@ public class LiveFansGroupBuyDialog extends AbsDialogCenterPopupWindow { .getFansExclusivePack(liveUid, id, new HttpCallback() { @Override public void onSuccess(FansGroupGiftPackInfo data) { + giftName.setText(String.format(mContext.getString(R.string.live_fans_group_buy_title), data.getPackName())); adapter.setList(data.getData()); giftInfo.setText(data.getDescription()); buy.setText(String.format(mContext.getString(R.string.live_fans_group_buy_buy), data.getCoin())); diff --git a/live/src/main/res/values-en/strings.xml b/live/src/main/res/values-en/strings.xml index 162a6cf74..d631ad437 100644 --- a/live/src/main/res/values-en/strings.xml +++ b/live/src/main/res/values-en/strings.xml @@ -110,7 +110,7 @@ Join the fan group and unlock exclusive gifts Gift Currently Available To Send - The Perfect GiftPack + The %s Purchase a %s Diamond Specific Gift And Receive ALimited Resource %s Diamond Welcome,Fan Club Members diff --git a/live/src/main/res/values/strings.xml b/live/src/main/res/values/strings.xml index ae12ea481..e462246aa 100644 --- a/live/src/main/res/values/strings.xml +++ b/live/src/main/res/values/strings.xml @@ -108,7 +108,7 @@ 加入粉絲團,解鎖專屬禮物 赠送 當前可送出 - 的臻愛禮包 + 的%s 購買可獲得%s鑽特定禮物,同時可獲得限定資源 %s鑽購買 粉絲團成員歡迎進房