From 5b813aff88a250f4c35138eaa90b310028868c01 Mon Sep 17 00:00:00 2001
From: hch <16607480311@163.com>
Date: Wed, 17 Jan 2024 11:12:53 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../main/res/layout/dialog_del_sys_msg.xml | 8 +--
common/src/main/res/values-en-rUS/string.xml | 2 +
common/src/main/res/values-zh-rHK/strings.xml | 1 +
common/src/main/res/values-zh-rTW/strings.xml | 2 +
common/src/main/res/values-zh/strings.xml | 2 +
common/src/main/res/values/strings.xml | 2 +
.../live/activity/CompensateActivity.java | 52 ++++++-------------
.../main/res/layout/activity_compensate.xml | 12 ++---
8 files changed, 36 insertions(+), 45 deletions(-)
diff --git a/common/src/main/res/layout/dialog_del_sys_msg.xml b/common/src/main/res/layout/dialog_del_sys_msg.xml
index 3ef23ead4..691d65d14 100644
--- a/common/src/main/res/layout/dialog_del_sys_msg.xml
+++ b/common/src/main/res/layout/dialog_del_sys_msg.xml
@@ -26,26 +26,26 @@
android:orientation="horizontal">
diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml
index 52ccbcbbf..1a4af54ee 100644
--- a/common/src/main/res/values-en-rUS/string.xml
+++ b/common/src/main/res/values-en-rUS/string.xml
@@ -1445,4 +1445,6 @@ Limited ride And limited avatar frame
Information
Unmute
Mute
+
+ Cancel
diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml
index 46ff1fc27..d10050f16 100644
--- a/common/src/main/res/values-zh-rHK/strings.xml
+++ b/common/src/main/res/values-zh-rHK/strings.xml
@@ -1444,4 +1444,5 @@
直播通行證
+ 取消
diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml
index e17bbbf4f..1018b7ee1 100644
--- a/common/src/main/res/values-zh-rTW/strings.xml
+++ b/common/src/main/res/values-zh-rTW/strings.xml
@@ -1443,4 +1443,6 @@
直播通行證
+ 取消
+
diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml
index 472ac39c6..7649f4799 100644
--- a/common/src/main/res/values-zh/strings.xml
+++ b/common/src/main/res/values-zh/strings.xml
@@ -1440,4 +1440,6 @@
直播通行證
+ 取消
+
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 1b5e11e88..e40c4c050 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -1449,4 +1449,6 @@ Limited ride And limited avatar frame
BattlePass
+ Cancel
+
diff --git a/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java b/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java
index d6d8371bb..a3f24c18f 100644
--- a/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java
+++ b/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java
@@ -6,6 +6,7 @@ import android.text.format.DateUtils;
import android.view.View;
import android.view.ViewOutlineProvider;
import android.widget.Button;
+import android.widget.ImageView;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -22,6 +23,7 @@ import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.Constants;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.bean.IMLoginModel;
+import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.RouteUtil;
@@ -51,7 +53,6 @@ import java.util.Map;
@Route(path = RouteUtil.PATH_COMPENSATE_ACTIVITY)
public class CompensateActivity extends AbsActivity {
- Banner banner_me;
TextView content;
TextView time;
RecyclerView recyclerView;
@@ -59,6 +60,8 @@ public class CompensateActivity extends AbsActivity {
String msgId, mBanner, mContent, link;
Button submit;
+ ImageView imgContent;
+
@Override
protected int getLayoutId() {
return R.layout.activity_compensate;
@@ -75,6 +78,7 @@ public class CompensateActivity extends AbsActivity {
content = findViewById(R.id.content);
submit = findViewById(R.id.submit);
time = findViewById(R.id.time);
+ imgContent = findViewById(R.id.img_content);
recyclerView = findViewById(R.id.hor_recycler);
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
@@ -94,13 +98,6 @@ public class CompensateActivity extends AbsActivity {
time.setText(sdf.format(currenTimeZone));
content.setText(mContent);
- banner_me = findViewById(R.id.banner_me);
- banner_me.setOutlineProvider(new ViewOutlineProvider() {
- @Override
- public void getOutline(View view, Outline outline) {
- outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
- }
- });
if (!getIntent().getBooleanExtra("receive", false)) {
submit.setBackground(mContext.getDrawable(R.mipmap.icon_sys_received));
submit.setText(getString(R.string.receive2));
@@ -130,13 +127,19 @@ public class CompensateActivity extends AbsActivity {
getMessageGiftInfo();
if (!StringUtils.isEmpty(mBanner)) {
- List mBannerList = new ArrayList<>();
- SlideBean slideBean = new SlideBean();
- slideBean.setSlide_pic(mBanner);
- slideBean.setSlide_url(link);
- mBannerList.add(slideBean);
- showBanner(mBannerList);
+ ImgLoader.display(mContext, mBanner, imgContent);
+
+ IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
+ StringBuffer urlBuffer = new StringBuffer();
+ urlBuffer.append(link).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
+
findViewById(R.id.lt_advertisement).setVisibility(View.VISIBLE);
+ findViewById(R.id.lt_advertisement).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
+ }
+ });
}
}
@@ -149,25 +152,4 @@ public class CompensateActivity extends AbsActivity {
}
});
}
-
- private void showBanner(List mBannerList) {
- banner_me.setAutoPlay(true).setPages(mBannerList, new CustomMyViewHolder()).setDelayTime(3000).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() {
- @Override
- public void onBannerClick(List datas, int p) {
- if (mBannerList != null) {
- if (p >= 0 && p < mBannerList.size()) {
- SlideBean bean = mBannerList.get(p);
- if (!bean.getSlide_url().equals("")) {
-
- IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
- StringBuffer urlBuffer = new StringBuffer();
- urlBuffer.append(bean.getSlide_url()).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
- mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
-
- }
- }
- }
- }
- }).start();
- }
}
diff --git a/live/src/main/res/layout/activity_compensate.xml b/live/src/main/res/layout/activity_compensate.xml
index a4dafaf6e..890092289 100644
--- a/live/src/main/res/layout/activity_compensate.xml
+++ b/live/src/main/res/layout/activity_compensate.xml
@@ -80,13 +80,13 @@
app:cardCornerRadius="10dp"
app:cardElevation="0dp">
-
+ android:layout_height="87dp"
+ android:layout_centerHorizontal="true"
+ android:scaleType="centerCrop" />
+
From 3a1268aac76ddea74bbc2fbe8b0a8c4436730d9c Mon Sep 17 00:00:00 2001
From: hch <16607480311@163.com>
Date: Wed, 17 Jan 2024 11:26:15 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../live/activity/CompensateActivity.java | 24 ++++++++++---------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java b/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java
index a3f24c18f..b49b023bd 100644
--- a/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java
+++ b/live/src/main/java/com/yunbao/live/activity/CompensateActivity.java
@@ -128,18 +128,20 @@ public class CompensateActivity extends AbsActivity {
if (!StringUtils.isEmpty(mBanner)) {
ImgLoader.display(mContext, mBanner, imgContent);
-
- IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
- StringBuffer urlBuffer = new StringBuffer();
- urlBuffer.append(link).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
-
findViewById(R.id.lt_advertisement).setVisibility(View.VISIBLE);
- findViewById(R.id.lt_advertisement).setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
- }
- });
+
+ if (!StringUtils.isEmpty(link)) {
+ IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
+ StringBuffer urlBuffer = new StringBuffer();
+ urlBuffer.append(link).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
+
+ findViewById(R.id.lt_advertisement).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
+ }
+ });
+ }
}
}
From 28571272858f209afc6683c68b31e09ff807a6fd Mon Sep 17 00:00:00 2001
From: zlzw <583819556@qq.com>
Date: Wed, 17 Jan 2024 16:21:25 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=88=98=E4=BB=A4?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=97=B4=E8=B7=9D=20=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?=E3=80=90=E6=88=98=E4=BB=A4=E4=BD=99=E9=A2=9D=E4=B8=8D=E8=B6=B3?=
=?UTF-8?q?=E6=9C=AA=E8=B7=B3=E8=BD=AC=E5=85=85=E5=80=BC=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E3=80=91=E9=97=AE=E9=A2=98=20=E4=BF=AE=E5=A4=8D=E3=80=90?=
=?UTF-8?q?=E6=88=98=E4=BB=A4=E5=BC=80=E9=80=9A=E7=AD=89=E7=BA=A7=E6=97=B6?=
=?UTF-8?q?=E5=BC=B9=E6=A1=86=E9=87=91=E9=A2=9D=E5=81=B6=E5=B0=94=E4=B8=8D?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E3=80=91=20=E8=B0=83?=
=?UTF-8?q?=E6=95=B4=E6=88=98=E4=BB=A4=E8=8E=B7=E5=8F=96=E9=87=91=E9=A2=9D?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=20=E8=B0=83=E6=95=B4=E6=88=98=E4=BB=A4item?=
=?UTF-8?q?=E5=90=8D=E5=AD=97=E6=98=BE=E7=A4=BA=E6=A8=A1=E5=BC=8F=20?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=E6=88=98=E4=BB=A4=E8=B4=AD=E4=B9=B0=E7=BB=8F?=
=?UTF-8?q?=E9=AA=8C=E5=BC=B9=E6=A1=86=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dialog/LiberalBattlePassPopupWindow.java | 1 +
.../common/dialog/OrderLevelPopupWindow.java | 11 ++--
.../common/http/live/LiveNetManager.java | 4 +-
.../yunbao/common/manager/IMLoginManager.java | 18 ++++++
config.gradle | 8 +--
.../main/activity/BattlePassActivity.java | 16 +++++
.../main/adapter/BattlePassRewardAdapter.java | 61 ++++++++++++++++++-
.../fragment/BattlePassMissionFragment.java | 25 +++++++-
.../fragment/BattlePassRewardFragment.java | 33 ++++++++++
.../main/res/layout/activity_battlepass.xml | 8 +--
.../item_battlepass_reward_type_top.xml | 17 +++---
11 files changed, 174 insertions(+), 28 deletions(-)
diff --git a/common/src/main/java/com/yunbao/common/dialog/LiberalBattlePassPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/LiberalBattlePassPopupWindow.java
index d01dc42a7..fb0a87a5e 100644
--- a/common/src/main/java/com/yunbao/common/dialog/LiberalBattlePassPopupWindow.java
+++ b/common/src/main/java/com/yunbao/common/dialog/LiberalBattlePassPopupWindow.java
@@ -77,6 +77,7 @@ public class LiberalBattlePassPopupWindow extends CenterPopupView {
mPassCallback.onCallback(data.getData().getCode(), data.getData().getMsg());
}
IMLoginManager.get(getContext()).upDataUserInfo();
+ IMLoginManager.get(getContext()).updateUserCoin();
}
@Override
diff --git a/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java
index e9d0ae11c..205ecac5f 100644
--- a/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java
+++ b/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java
@@ -9,6 +9,7 @@ import androidx.annotation.NonNull;
import com.lxj.xpopup.core.CenterPopupView;
import com.yunbao.common.R;
+import com.yunbao.common.bean.BattlePassUserInfoBean;
import com.yunbao.common.http.ResponseModel;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
@@ -28,11 +29,12 @@ public class OrderLevelPopupWindow extends CenterPopupView {
private ProgressBar progressBar;
private OrderLevelCallback orderLevelCallback;
private long maxExp;
-
- public OrderLevelPopupWindow(@NonNull Context context,
+ private BattlePassUserInfoBean userInfoBean;
+ public OrderLevelPopupWindow(@NonNull Context context, BattlePassUserInfoBean userInfoBean,
int mCurrentExperience, int mTotalExperience,
- String mCurrentLevel, String mBalance,long maxExp, OrderLevelCallback mOrderLevelCallback) {
+ String mCurrentLevel, String mBalance, long maxExp, OrderLevelCallback mOrderLevelCallback) {
super(context);
+ this.userInfoBean = userInfoBean;
currentExperience = mCurrentExperience;
totalExperience = mTotalExperience;
currentLevel = mCurrentLevel;
@@ -59,7 +61,7 @@ public class OrderLevelPopupWindow extends CenterPopupView {
orderLevel.setText(buyExp);
progressBar.setMax(totalExperience);
progressBar.setProgress(currentExperience);
- expText.setText(String.format("%s/%s", currentExperience, totalExperience));
+ expText.setText(String.format("%s/%s", userInfoBean.getBattlePassExp(), userInfoBean.getNextLevelExp()));
current.setText(String.format("Lv%s", currentLevel));
balanceDiamond.setText(balance);
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
@@ -102,6 +104,7 @@ public class OrderLevelPopupWindow extends CenterPopupView {
.buyingExperiencePoint(buyExp, new HttpCallback>() {
@Override
public void onSuccess(ResponseModel