Merge remote-tracking branch 'origin/master'
# Conflicts: # config.gradle
This commit is contained in:
commit
3d1c4466e0
@ -173,4 +173,27 @@ public class BattlePassUserInfoBean extends BaseModel{
|
|||||||
public void setMaxLevel(int maxLevel) {
|
public void setMaxLevel(int maxLevel) {
|
||||||
this.maxLevel = maxLevel;
|
this.maxLevel = maxLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "BattlePassUserInfoBean{" +
|
||||||
|
"uid='" + uid + '\'' +
|
||||||
|
", points=" + points +
|
||||||
|
", battlePassExp=" + battlePassExp +
|
||||||
|
", battlePassUserRecords1=" + battlePassUserRecords1 +
|
||||||
|
", battlePassUserRecords2=" + battlePassUserRecords2 +
|
||||||
|
", battlePassUserRecords3=" + battlePassUserRecords3 +
|
||||||
|
", level=" + level +
|
||||||
|
", lastLevelExp=" + lastLevelExp +
|
||||||
|
", nextLevelExp=" + nextLevelExp +
|
||||||
|
", id='" + id + '\'' +
|
||||||
|
", battlePassName='" + battlePassName + '\'' +
|
||||||
|
", startTime='" + startTime + '\'' +
|
||||||
|
", endTime='" + endTime + '\'' +
|
||||||
|
", battlePassStatus=" + battlePassStatus +
|
||||||
|
", maxLevelExp=" + maxLevelExp +
|
||||||
|
", maxLevel=" + maxLevel +
|
||||||
|
", live_battle_pass_type=" + live_battle_pass_type +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,5 +158,18 @@ public class LiveBattlePassRewardsBean extends BaseModel{
|
|||||||
public void setReceived(int received) {
|
public void setReceived(int received) {
|
||||||
this.received = received;
|
this.received = received;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LiveBattlePassReward{" +
|
||||||
|
"id=" + id +
|
||||||
|
", liveBattlePassLevel=" + liveBattlePassLevel +
|
||||||
|
", liveBattlePassTypeId=" + liveBattlePassTypeId +
|
||||||
|
", rewardName='" + rewardName + '\'' +
|
||||||
|
", imageUrl='" + imageUrl + '\'' +
|
||||||
|
", lock=" + lock +
|
||||||
|
", received=" + received +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,7 @@ public class LiberalBattlePassPopupWindow extends CenterPopupView {
|
|||||||
mPassCallback.onCallback(data.getData().getCode(), data.getData().getMsg());
|
mPassCallback.onCallback(data.getData().getCode(), data.getData().getMsg());
|
||||||
}
|
}
|
||||||
IMLoginManager.get(getContext()).upDataUserInfo();
|
IMLoginManager.get(getContext()).upDataUserInfo();
|
||||||
|
IMLoginManager.get(getContext()).updateUserCoin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -7,11 +7,15 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.lxj.xpopup.core.CenterPopupView;
|
import com.lxj.xpopup.core.CenterPopupView;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||||
import com.yunbao.common.http.ResponseModel;
|
import com.yunbao.common.http.ResponseModel;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
@ -22,22 +26,24 @@ import java.math.BigDecimal;
|
|||||||
* 战令等级 经验
|
* 战令等级 经验
|
||||||
*/
|
*/
|
||||||
public class OrderLevelPopupWindow extends CenterPopupView {
|
public class OrderLevelPopupWindow extends CenterPopupView {
|
||||||
private TextView orderLevel, orderLevelDiamond, balanceDiamond, current,expText;
|
private TextView orderLevel, orderLevelDiamond, balanceDiamond, current, expText;
|
||||||
private int currentExperience, totalExperience;//当前经验,全部经验
|
private int currentExperience, totalExperience;//当前经验,全部经验
|
||||||
private String buyExp = "100", currentLevel, balance;
|
private String buyExp = "100", currentLevel, balance;
|
||||||
private ProgressBar progressBar;
|
private ProgressBar progressBar;
|
||||||
private OrderLevelCallback orderLevelCallback;
|
private OrderLevelCallback orderLevelCallback;
|
||||||
private long maxExp;
|
private long maxExp;
|
||||||
|
private BattlePassUserInfoBean userInfoBean;
|
||||||
|
|
||||||
public OrderLevelPopupWindow(@NonNull Context context,
|
public OrderLevelPopupWindow(@NonNull Context context, BattlePassUserInfoBean userInfoBean,
|
||||||
int mCurrentExperience, int mTotalExperience,
|
int mCurrentExperience, int mTotalExperience,
|
||||||
String mCurrentLevel, String mBalance,long maxExp, OrderLevelCallback mOrderLevelCallback) {
|
String mCurrentLevel, String mBalance, long maxExp, OrderLevelCallback mOrderLevelCallback) {
|
||||||
super(context);
|
super(context);
|
||||||
|
this.userInfoBean = userInfoBean;
|
||||||
currentExperience = mCurrentExperience;
|
currentExperience = mCurrentExperience;
|
||||||
totalExperience = mTotalExperience;
|
totalExperience = mTotalExperience;
|
||||||
currentLevel = mCurrentLevel;
|
currentLevel = mCurrentLevel;
|
||||||
balance = mBalance;
|
balance = mBalance;
|
||||||
this.maxExp=maxExp;
|
this.maxExp = maxExp;
|
||||||
orderLevelCallback = mOrderLevelCallback;
|
orderLevelCallback = mOrderLevelCallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +65,7 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
|||||||
orderLevel.setText(buyExp);
|
orderLevel.setText(buyExp);
|
||||||
progressBar.setMax(totalExperience);
|
progressBar.setMax(totalExperience);
|
||||||
progressBar.setProgress(currentExperience);
|
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));
|
current.setText(String.format("Lv%s", currentLevel));
|
||||||
balanceDiamond.setText(balance);
|
balanceDiamond.setText(balance);
|
||||||
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
|
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
|
||||||
@ -83,8 +89,8 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
|||||||
buyExp = String.valueOf(buyExpBigDecimal.intValue());
|
buyExp = String.valueOf(buyExpBigDecimal.intValue());
|
||||||
orderLevelDiamond.setText(String.valueOf(buyExpBigDecimal.floatValue()));
|
orderLevelDiamond.setText(String.valueOf(buyExpBigDecimal.floatValue()));
|
||||||
orderLevel.setText(buyExp);
|
orderLevel.setText(buyExp);
|
||||||
}else if(exp>=maxExp){
|
} else if (exp >= maxExp) {
|
||||||
ToastUtil.show(WordUtil.isNewZh()?"经验已滿":"Experience full");
|
ToastUtil.show(WordUtil.isNewZh() ? "经验已滿" : "Experience full");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -102,20 +108,33 @@ public class OrderLevelPopupWindow extends CenterPopupView {
|
|||||||
.buyingExperiencePoint(buyExp, new HttpCallback<ResponseModel<Object>>() {
|
.buyingExperiencePoint(buyExp, new HttpCallback<ResponseModel<Object>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(ResponseModel<Object> data) {
|
public void onSuccess(ResponseModel<Object> data) {
|
||||||
|
|
||||||
if (orderLevelCallback != null) {
|
if (orderLevelCallback != null) {
|
||||||
orderLevelCallback.onCallback(data.getData().getCode(), data.getMsg());
|
orderLevelCallback.onCallback(data.getData().getCode(), data.getMsg());
|
||||||
}dialog.dismiss();
|
}
|
||||||
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
if (orderLevelCallback != null) {
|
if (orderLevelCallback != null) {
|
||||||
orderLevelCallback.onCallback(102, error);
|
orderLevelCallback.onCallback(102, error);
|
||||||
} dialog.dismiss();
|
}
|
||||||
|
dialog.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
IMLoginManager.get(getContext())
|
||||||
|
.updateUserCoin(new OnItemClickListener<JSONObject>() {
|
||||||
|
@Override
|
||||||
|
public void onItemClick(JSONObject bean, int position) {
|
||||||
|
if (bean != null) {
|
||||||
|
balance = bean.getString("coin");
|
||||||
|
balanceDiamond.setText(balance);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface OrderLevelCallback {
|
public interface OrderLevelCallback {
|
||||||
|
@ -2674,11 +2674,9 @@ public class LiveNetManager {
|
|||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(responseModel -> {
|
.subscribe(responseModel -> {
|
||||||
if (callback != null) {
|
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, new Consumer<Throwable>() {
|
}, new Consumer<Throwable>() {
|
||||||
@Override
|
@Override
|
||||||
public void accept(Throwable throwable) throws Exception {
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
@ -8,6 +8,7 @@ import android.text.TextUtils;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.lzf.easyfloat.EasyFloat;
|
import com.lzf.easyfloat.EasyFloat;
|
||||||
import com.umeng.analytics.MobclickAgent;
|
import com.umeng.analytics.MobclickAgent;
|
||||||
@ -16,6 +17,7 @@ import com.yunbao.common.bean.IMLoginModel;
|
|||||||
import com.yunbao.common.event.DataUserInfoEvent;
|
import com.yunbao.common.event.DataUserInfoEvent;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.HttpClient;
|
import com.yunbao.common.http.HttpClient;
|
||||||
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||||
@ -509,5 +511,39 @@ public class IMLoginManager extends BaseCacheManager {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
public void updateUserCoin(){
|
||||||
|
HttpClient.getInstance().get("User.getUserBalance", "User.getUserBalance")
|
||||||
|
.execute(new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
if (code == 0) {
|
||||||
|
JSONObject obj = JSONObject.parseObject(info[0]);
|
||||||
|
String golds = obj.getString("gold");
|
||||||
|
String coins = obj.getString("coin");
|
||||||
|
String yuanbaos = obj.getString("yuanbao");
|
||||||
|
userInfo.setCoin(obj.getLong("coin"));
|
||||||
|
userInfo.setGold(obj.getLong("gold"));
|
||||||
|
userInfo.setYuanbao(yuanbaos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
public void updateUserCoin(OnItemClickListener<JSONObject> listener){
|
||||||
|
HttpClient.getInstance().get("User.getUserBalance", "User.getUserBalance")
|
||||||
|
.execute(new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
if (code == 0) {
|
||||||
|
JSONObject obj = JSONObject.parseObject(info[0]);
|
||||||
|
listener.onItemClick(obj,0);
|
||||||
|
String golds = obj.getString("gold");
|
||||||
|
String coins = obj.getString("coin");
|
||||||
|
String yuanbaos = obj.getString("yuanbao");
|
||||||
|
userInfo.setCoin(obj.getLong("coin"));
|
||||||
|
userInfo.setGold(obj.getLong("gold"));
|
||||||
|
userInfo.setYuanbao(yuanbaos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,26 +26,26 @@
|
|||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_confirm"
|
android:id="@+id/btn_cancel"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:background="@mipmap/icon_del_sys_confirm"
|
android:background="@mipmap/icon_del_sys_confirm"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingBottom="2dp"
|
android:paddingBottom="2dp"
|
||||||
android:text="@string/confirm"
|
android:text="@string/sys_msg_cancel"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_cancel"
|
android:id="@+id/btn_confirm"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:layout_marginLeft="30dp"
|
android:layout_marginLeft="30dp"
|
||||||
android:background="@mipmap/icon_del_sys_cancel"
|
android:background="@mipmap/icon_del_sys_cancel"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingBottom="2dp"
|
android:paddingBottom="2dp"
|
||||||
android:text="@string/cancel"
|
android:text="@string/confirm"
|
||||||
android:textColor="@color/yellow_ff6c00"
|
android:textColor="@color/yellow_ff6c00"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
@ -1445,4 +1445,6 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="game_review_view_information">Information</string>
|
<string name="game_review_view_information">Information</string>
|
||||||
<string name="game_review_view_unmute">Unmute</string>
|
<string name="game_review_view_unmute">Unmute</string>
|
||||||
<string name="game_review_view_sound_off">Mute</string>
|
<string name="game_review_view_sound_off">Mute</string>
|
||||||
|
|
||||||
|
<string name="sys_msg_cancel">Cancel</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1444,4 +1444,5 @@
|
|||||||
|
|
||||||
<string name="main_suspension_war_order">直播通行證</string>
|
<string name="main_suspension_war_order">直播通行證</string>
|
||||||
|
|
||||||
|
<string name="sys_msg_cancel">取消</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1443,4 +1443,6 @@
|
|||||||
|
|
||||||
<string name="main_suspension_war_order">直播通行證</string>
|
<string name="main_suspension_war_order">直播通行證</string>
|
||||||
|
|
||||||
|
<string name="sys_msg_cancel">取消</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1440,4 +1440,6 @@
|
|||||||
|
|
||||||
<string name="main_suspension_war_order">直播通行證</string>
|
<string name="main_suspension_war_order">直播通行證</string>
|
||||||
|
|
||||||
|
<string name="sys_msg_cancel">取消</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1449,4 +1449,6 @@ Limited ride And limited avatar frame</string>
|
|||||||
|
|
||||||
<string name="main_suspension_war_order">BattlePass</string>
|
<string name="main_suspension_war_order">BattlePass</string>
|
||||||
|
|
||||||
|
<string name="sys_msg_cancel">Cancel</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -5,13 +5,13 @@ ext {
|
|||||||
minSdkVersion : 21,
|
minSdkVersion : 21,
|
||||||
targetSdkVersion : 33,
|
targetSdkVersion : 33,
|
||||||
versionCode : 460,
|
versionCode : 460,
|
||||||
versionName : "6.6.3"
|
versionName : "6.6.4"
|
||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式、
|
//正式、
|
||||||
serverHost : "https://napi.yaoulive.com",
|
serverHost : "https://napi.yaoulive.com",
|
||||||
// 测试
|
// 测试
|
||||||
// serverHost : " https://ceshi.yaoulive.com",
|
//serverHost : " https://ceshi.yaoulive.com",
|
||||||
|
|
||||||
//百度语音识别
|
//百度语音识别
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ ext {
|
|||||||
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S",
|
||||||
|
|
||||||
// true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 3 samsung包
|
// true表示谷歌支付 false 0 链接包 1 谷歌包 2华为包 3 samsung包
|
||||||
isGooglePlay : 3,
|
isGooglePlay : 0,
|
||||||
//是否上报异常日0
|
//是否上报异常日志
|
||||||
isUploadLog : true,
|
isUploadLog : true,
|
||||||
//是否打包成插件包模式
|
//是否打包成插件包模式
|
||||||
isPluginModel : true,
|
isPluginModel : true,
|
||||||
|
@ -6,6 +6,7 @@ import android.text.format.DateUtils;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewOutlineProvider;
|
import android.view.ViewOutlineProvider;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
@ -22,6 +23,7 @@ import com.yunbao.common.CommonAppConfig;
|
|||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.activity.AbsActivity;
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
@ -51,7 +53,6 @@ import java.util.Map;
|
|||||||
@Route(path = RouteUtil.PATH_COMPENSATE_ACTIVITY)
|
@Route(path = RouteUtil.PATH_COMPENSATE_ACTIVITY)
|
||||||
public class CompensateActivity extends AbsActivity {
|
public class CompensateActivity extends AbsActivity {
|
||||||
|
|
||||||
Banner banner_me;
|
|
||||||
TextView content;
|
TextView content;
|
||||||
TextView time;
|
TextView time;
|
||||||
RecyclerView recyclerView;
|
RecyclerView recyclerView;
|
||||||
@ -59,6 +60,8 @@ public class CompensateActivity extends AbsActivity {
|
|||||||
String msgId, mBanner, mContent, link;
|
String msgId, mBanner, mContent, link;
|
||||||
Button submit;
|
Button submit;
|
||||||
|
|
||||||
|
ImageView imgContent;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.activity_compensate;
|
return R.layout.activity_compensate;
|
||||||
@ -75,6 +78,7 @@ public class CompensateActivity extends AbsActivity {
|
|||||||
content = findViewById(R.id.content);
|
content = findViewById(R.id.content);
|
||||||
submit = findViewById(R.id.submit);
|
submit = findViewById(R.id.submit);
|
||||||
time = findViewById(R.id.time);
|
time = findViewById(R.id.time);
|
||||||
|
imgContent = findViewById(R.id.img_content);
|
||||||
|
|
||||||
recyclerView = findViewById(R.id.hor_recycler);
|
recyclerView = findViewById(R.id.hor_recycler);
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||||
@ -94,13 +98,6 @@ public class CompensateActivity extends AbsActivity {
|
|||||||
time.setText(sdf.format(currenTimeZone));
|
time.setText(sdf.format(currenTimeZone));
|
||||||
|
|
||||||
content.setText(mContent);
|
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)) {
|
if (!getIntent().getBooleanExtra("receive", false)) {
|
||||||
submit.setBackground(mContext.getDrawable(R.mipmap.icon_sys_received));
|
submit.setBackground(mContext.getDrawable(R.mipmap.icon_sys_received));
|
||||||
submit.setText(getString(R.string.receive2));
|
submit.setText(getString(R.string.receive2));
|
||||||
@ -130,13 +127,21 @@ public class CompensateActivity extends AbsActivity {
|
|||||||
getMessageGiftInfo();
|
getMessageGiftInfo();
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(mBanner)) {
|
if (!StringUtils.isEmpty(mBanner)) {
|
||||||
List<SlideBean> mBannerList = new ArrayList<>();
|
ImgLoader.display(mContext, mBanner, imgContent);
|
||||||
SlideBean slideBean = new SlideBean();
|
|
||||||
slideBean.setSlide_pic(mBanner);
|
|
||||||
slideBean.setSlide_url(link);
|
|
||||||
mBannerList.add(slideBean);
|
|
||||||
showBanner(mBannerList);
|
|
||||||
findViewById(R.id.lt_advertisement).setVisibility(View.VISIBLE);
|
findViewById(R.id.lt_advertisement).setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
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()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,25 +154,4 @@ public class CompensateActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showBanner(List<SlideBean> 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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -80,13 +80,13 @@
|
|||||||
app:cardCornerRadius="10dp"
|
app:cardCornerRadius="10dp"
|
||||||
app:cardElevation="0dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<com.ms.banner.Banner
|
<ImageView
|
||||||
android:id="@+id/banner_me"
|
android:id="@+id/img_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="87dp"
|
||||||
app:delay_time="5000"
|
android:layout_centerHorizontal="true"
|
||||||
app:indicator_height="8dp"
|
android:scaleType="centerCrop" />
|
||||||
app:indicator_width="8dp" />
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.yunbao.main.activity;
|
package com.yunbao.main.activity;
|
||||||
|
|
||||||
|
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
@ -15,6 +17,7 @@ import androidx.viewpager2.adapter.FragmentStateAdapter;
|
|||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.yunbao.common.activity.AbsActivity;
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||||
@ -133,6 +136,19 @@ public class BattlePassActivity extends AbsActivity {
|
|||||||
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onCallback(int code, String msg) {
|
public void onCallback(int code, String msg) {
|
||||||
|
if (code == 1001) {
|
||||||
|
new DialogUitl.Builder(mContext)
|
||||||
|
.setView(com.yunbao.live.R.layout.dialog_live_unfollow)
|
||||||
|
.setConfirmString(getString(com.yunbao.live.R.string.charge))
|
||||||
|
.setContent(getString(com.yunbao.live.R.string.insufficient_balance))
|
||||||
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||||
|
}
|
||||||
|
}).build().show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
ToastUtil.show(msg);
|
ToastUtil.show(msg);
|
||||||
initData();
|
initData();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
package com.yunbao.main.adapter;
|
package com.yunbao.main.adapter;
|
||||||
|
|
||||||
|
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -13,18 +18,26 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||||
import com.yunbao.common.bean.HttpCallbackModel;
|
import com.yunbao.common.bean.HttpCallbackModel;
|
||||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||||
|
import com.yunbao.common.dialog.ActivateEliteBattleOrderPopupWindow;
|
||||||
|
import com.yunbao.common.dialog.LiberalBattlePassPopupWindow;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
|
import com.yunbao.main.event.BattlePassTypeEvent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -36,6 +49,7 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
|||||||
private List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList = new ArrayList<>();
|
private List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList = new ArrayList<>();
|
||||||
private int userLevel;
|
private int userLevel;
|
||||||
private BattlePassUserInfoBean userType;
|
private BattlePassUserInfoBean userType;
|
||||||
|
private String quintessenceSpendMoney,enjoySpendMoney;
|
||||||
private OnItemClickListener<LiveBattlePassRewardsBean.LiveBattlePassReward> onItemClickListener;
|
private OnItemClickListener<LiveBattlePassRewardsBean.LiveBattlePassReward> onItemClickListener;
|
||||||
|
|
||||||
public void setList(List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList) {
|
public void setList(List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList) {
|
||||||
@ -74,6 +88,14 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
|||||||
return mList.size();
|
return mList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setQuintessenceSpendMoney(String quintessenceSpendMoney) {
|
||||||
|
this.quintessenceSpendMoney=quintessenceSpendMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnjoySpendMoney(String enjoySpendMoney) {
|
||||||
|
this.enjoySpendMoney=enjoySpendMoney;
|
||||||
|
}
|
||||||
|
|
||||||
public class VH extends RecyclerView.ViewHolder {
|
public class VH extends RecyclerView.ViewHolder {
|
||||||
View lineBg, line, point;
|
View lineBg, line, point;
|
||||||
View tab1Layout, tab2Layout, tab3Layout;
|
View tab1Layout, tab2Layout, tab3Layout;
|
||||||
@ -144,6 +166,9 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
|||||||
setVisibility(View.VISIBLE, -1, tab1Layout, tab2Layout, tab3Layout);
|
setVisibility(View.VISIBLE, -1, tab1Layout, tab2Layout, tab3Layout);
|
||||||
setVisibility(View.VISIBLE, -1, tab1, tab2, tab3);
|
setVisibility(View.VISIBLE, -1, tab1, tab2, tab3);
|
||||||
setVisibility(View.VISIBLE, -1, tab1Mask, tab2Mask, tab3Mask);
|
setVisibility(View.VISIBLE, -1, tab1Mask, tab2Mask, tab3Mask);
|
||||||
|
ConstraintLayout.LayoutParams _params = (ConstraintLayout.LayoutParams) line.getLayoutParams();
|
||||||
|
_params.bottomMargin = DpUtil.dp2px(0);
|
||||||
|
line.setLayoutParams(_params);
|
||||||
|
|
||||||
line.setVisibility(View.GONE);
|
line.setVisibility(View.GONE);
|
||||||
point.setVisibility(View.GONE);
|
point.setVisibility(View.GONE);
|
||||||
@ -179,6 +204,7 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
|||||||
}), tab1Unlock, tab2Unlock, tab3Unlock);
|
}), tab1Unlock, tab2Unlock, tab3Unlock);
|
||||||
getAllView(((reward, view) -> {
|
getAllView(((reward, view) -> {
|
||||||
lv.setText("V" + reward.getLiveBattlePassLevel());
|
lv.setText("V" + reward.getLiveBattlePassLevel());
|
||||||
|
lv.setTag(reward);
|
||||||
view.setText(reward.getRewardName());
|
view.setText(reward.getRewardName());
|
||||||
}), tab1Title, tab2Title, tab3Title);
|
}), tab1Title, tab2Title, tab3Title);
|
||||||
getAllView(((reward, view) -> {
|
getAllView(((reward, view) -> {
|
||||||
@ -206,6 +232,11 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
|||||||
}
|
}
|
||||||
if (reward.getLock() == 1) {
|
if (reward.getLock() == 1) {
|
||||||
//ToastUtil.show("锁了");
|
//ToastUtil.show("锁了");
|
||||||
|
if(reward.getLiveBattlePassTypeId()==2){
|
||||||
|
showBuyType(true);
|
||||||
|
}else{
|
||||||
|
showBuyType(false);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (reward.getReceived() == 2) {
|
if (reward.getReceived() == 2) {
|
||||||
@ -236,7 +267,7 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
|||||||
.getRewards(String.valueOf(reward.getLiveBattlePassLevel()), String.valueOf(reward.getId()), new HttpCallback<HttpCallbackModel>() {
|
.getRewards(String.valueOf(reward.getLiveBattlePassLevel()), String.valueOf(reward.getId()), new HttpCallback<HttpCallbackModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(HttpCallbackModel data) {
|
public void onSuccess(HttpCallbackModel data) {
|
||||||
ToastUtil.show(WordUtil.getNewString(R.string.battlepass_reward_item_get));
|
ToastUtil.show(data.getMsg());
|
||||||
if (onItemClickListener != null) {
|
if (onItemClickListener != null) {
|
||||||
onItemClickListener.onItemClick(reward, reward.getId());
|
onItemClickListener.onItemClick(reward, reward.getId());
|
||||||
}
|
}
|
||||||
@ -275,7 +306,38 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
|||||||
setVisibility(View.INVISIBLE, type - 1, tab1Layout, tab2Layout, tab3Layout);
|
setVisibility(View.INVISIBLE, type - 1, tab1Layout, tab2Layout, tab3Layout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void showBuyType(boolean is){
|
||||||
|
new XPopup.Builder(itemView.getContext())
|
||||||
|
.enableDrag(false)
|
||||||
|
.maxWidth(DeviceUtils.getScreenHeight((Activity) itemView.getContext()) - DpUtil.dp2px(34))
|
||||||
|
.asCustom(new ActivateEliteBattleOrderPopupWindow(
|
||||||
|
itemView.getContext(),
|
||||||
|
is?quintessenceSpendMoney:enjoySpendMoney,
|
||||||
|
is,
|
||||||
|
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||||
|
@Override
|
||||||
|
public void onCallback(int code, String msg) {
|
||||||
|
if (code == 1001) {
|
||||||
|
new DialogUitl.Builder(itemView.getContext())
|
||||||
|
.setView(com.yunbao.live.R.layout.dialog_live_unfollow)
|
||||||
|
.setConfirmString(itemView.getContext().getString(com.yunbao.live.R.string.charge))
|
||||||
|
.setContent(itemView.getContext().getString(com.yunbao.live.R.string.insufficient_balance))
|
||||||
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||||
|
}
|
||||||
|
}).build().show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ToastUtil.show(msg);
|
||||||
|
Bus.get().post(new BattlePassTypeEvent(0));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"2"
|
||||||
|
))
|
||||||
|
.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private interface ViewData<T> {
|
private interface ViewData<T> {
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.yunbao.main.fragment;
|
package com.yunbao.main.fragment;
|
||||||
|
|
||||||
|
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.app.Dialog;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -8,6 +11,7 @@ import android.view.ViewGroup;
|
|||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.yunbao.common.bean.BattlePassTask;
|
import com.yunbao.common.bean.BattlePassTask;
|
||||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||||
@ -20,6 +24,7 @@ import com.yunbao.common.interfaces.OnItemClickListener;
|
|||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.DeviceUtils;
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
@ -83,18 +88,31 @@ public class BattlePassMissionFragment extends BaseFragment {
|
|||||||
.enableDrag(false)
|
.enableDrag(false)
|
||||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) getContext()) - DpUtil.dp2px(34))
|
.maxWidth(DeviceUtils.getScreenHeight((Activity) getContext()) - DpUtil.dp2px(34))
|
||||||
.asCustom(new OrderLevelPopupWindow(getContext(),
|
.asCustom(new OrderLevelPopupWindow(getContext(),
|
||||||
userInfoBean.getBattlePassExp() - userInfoBean.getLastLevelExp(),
|
userInfoBean,
|
||||||
userInfoBean.getNextLevelExp() - userInfoBean.getLastLevelExp(),
|
userInfoBean.getBattlePassExp()-userInfoBean.getLastLevelExp(),
|
||||||
|
userInfoBean.getNextLevelExp()-userInfoBean.getLastLevelExp(),
|
||||||
String.valueOf(userInfoBean.getLevel()),
|
String.valueOf(userInfoBean.getLevel()),
|
||||||
String.valueOf(IMLoginManager.get(getContext()).getUserInfo().getCoin()),
|
String.valueOf(IMLoginManager.get(getContext()).getUserInfo().getCoin()),
|
||||||
maxExp,
|
maxExp,
|
||||||
new OrderLevelPopupWindow.OrderLevelCallback() {
|
new OrderLevelPopupWindow.OrderLevelCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onCallback(int code, String msg) {
|
public void onCallback(int code, String msg) {
|
||||||
|
if (code == 1001) {
|
||||||
|
new DialogUitl.Builder(getContext())
|
||||||
|
.setView(com.yunbao.live.R.layout.dialog_live_unfollow)
|
||||||
|
.setConfirmString(getString(com.yunbao.live.R.string.charge))
|
||||||
|
.setContent(getString(com.yunbao.live.R.string.insufficient_balance))
|
||||||
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||||
|
}
|
||||||
|
}).build().show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
ToastUtil.show(msg);
|
ToastUtil.show(msg);
|
||||||
Bus.get().post(new BattlePassTypeEvent(0));
|
Bus.get().post(new BattlePassTypeEvent(0));
|
||||||
updateData();
|
updateData();
|
||||||
IMLoginManager.get(getContext()).upDataUserInfo();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.yunbao.main.fragment;
|
package com.yunbao.main.fragment;
|
||||||
|
|
||||||
|
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.app.Dialog;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -10,6 +13,7 @@ import android.widget.ImageView;
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||||
@ -21,6 +25,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
|||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.DeviceUtils;
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
@ -104,6 +109,19 @@ public class BattlePassRewardFragment extends BaseFragment {
|
|||||||
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onCallback(int code, String msg) {
|
public void onCallback(int code, String msg) {
|
||||||
|
if (code == 1001) {
|
||||||
|
new DialogUitl.Builder(getContext())
|
||||||
|
.setView(com.yunbao.live.R.layout.dialog_live_unfollow)
|
||||||
|
.setConfirmString(getString(com.yunbao.live.R.string.charge))
|
||||||
|
.setContent(getString(com.yunbao.live.R.string.insufficient_balance))
|
||||||
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||||
|
}
|
||||||
|
}).build().show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
ToastUtil.show(msg);
|
ToastUtil.show(msg);
|
||||||
updateData();
|
updateData();
|
||||||
Bus.get().post(new BattlePassTypeEvent(0));
|
Bus.get().post(new BattlePassTypeEvent(0));
|
||||||
@ -127,6 +145,19 @@ public class BattlePassRewardFragment extends BaseFragment {
|
|||||||
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onCallback(int code, String msg) {
|
public void onCallback(int code, String msg) {
|
||||||
|
if (code == 1001) {
|
||||||
|
new DialogUitl.Builder(getContext())
|
||||||
|
.setView(com.yunbao.live.R.layout.dialog_live_unfollow)
|
||||||
|
.setConfirmString(getString(com.yunbao.live.R.string.charge))
|
||||||
|
.setContent(getString(com.yunbao.live.R.string.insufficient_balance))
|
||||||
|
.setClickCallback(new DialogUitl.SimpleCallback() {
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
ARouter.getInstance().build(PATH_COIN).withInt("p", 0).navigation();
|
||||||
|
}
|
||||||
|
}).build().show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
ToastUtil.show(msg);
|
ToastUtil.show(msg);
|
||||||
updateData();
|
updateData();
|
||||||
Bus.get().post(new BattlePassTypeEvent(0));
|
Bus.get().post(new BattlePassTypeEvent(0));
|
||||||
@ -151,9 +182,11 @@ public class BattlePassRewardFragment extends BaseFragment {
|
|||||||
for (LiveBattlePassRewardsBean.BattlePassType passType : data.getLive_battle_pass_type()) {
|
for (LiveBattlePassRewardsBean.BattlePassType passType : data.getLive_battle_pass_type()) {
|
||||||
if (passType.getId() == 2) {
|
if (passType.getId() == 2) {
|
||||||
quintessenceSpendMoney = String.valueOf(passType.getDiamond_value());
|
quintessenceSpendMoney = String.valueOf(passType.getDiamond_value());
|
||||||
|
adapter.setQuintessenceSpendMoney(quintessenceSpendMoney);
|
||||||
}
|
}
|
||||||
if (passType.getId() == 3) {
|
if (passType.getId() == 3) {
|
||||||
enjoySpendMoney = String.valueOf(passType.getDiamond_value());
|
enjoySpendMoney = String.valueOf(passType.getDiamond_value());
|
||||||
|
adapter.setEnjoySpendMoney(enjoySpendMoney);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,13 +85,13 @@
|
|||||||
layout="@layout/view_battlepass_user"
|
layout="@layout/view_battlepass_user"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="32dp" />
|
android:layout_marginTop="16dp" />
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
android:layout_marginTop="26dp"
|
|
||||||
android:id="@+id/context_layout"
|
android:id="@+id/context_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:background="@drawable/background_order_dialog"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/background_order_dialog" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -122,13 +122,10 @@
|
|||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:text="甜蜜氣球\n&積分30"
|
android:text="甜蜜氣球\n&積分30"
|
||||||
android:textColor="#0D21B2"
|
android:textColor="#0D21B2"
|
||||||
android:textSize="14sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:maxLines="2"
|
android:maxLines="1"
|
||||||
app:autoSizeMaxTextSize="14sp"
|
android:ellipsize="end"
|
||||||
app:autoSizeMinTextSize="5sp"
|
|
||||||
app:autoSizeStepGranularity="1sp"
|
|
||||||
app:autoSizeTextType="uniform"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" />
|
app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" />
|
||||||
@ -199,7 +196,9 @@
|
|||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:text="甜蜜氣球\n&積分30"
|
android:text="甜蜜氣球\n&積分30"
|
||||||
android:textColor="#0D21B2"
|
android:textColor="#0D21B2"
|
||||||
android:textSize="14sp"
|
android:textSize="12sp"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@ -263,12 +262,14 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tab_3_title"
|
android:id="@+id/tab_3_title"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:ellipsize="end"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:text="甜蜜氣球\n&積分30"
|
android:text="甜蜜氣球\n&積分30"
|
||||||
android:textColor="#0D21B2"
|
android:textColor="#0D21B2"
|
||||||
android:textSize="14sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user