新增战令系统
@ -191,7 +191,7 @@ dependencies {
|
||||
api 'com.github.princekin-f:EasyFloat:2.0.4'
|
||||
api files('libs/Msc.jar')
|
||||
|
||||
api 'com.github.li-xiaojun:XPopup:2.9.1'
|
||||
api 'com.github.li-xiaojun:XPopup:2.10.0'
|
||||
|
||||
api 'com.github.shenbengit:PagerGridLayoutManager:1.1.7'
|
||||
//选择器
|
||||
|
@ -0,0 +1,175 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class BattlePassPoints extends BaseModel{
|
||||
private int id;
|
||||
private int type;
|
||||
@SerializedName("rewards_name")
|
||||
private String rewardsName;
|
||||
@SerializedName("rewards_id")
|
||||
private int rewardsId;
|
||||
@SerializedName("image_url")
|
||||
private String imageUrl;
|
||||
@SerializedName("points_threshold")
|
||||
private String pointsThreshold;
|
||||
@SerializedName("points_threshold_text")
|
||||
private String pointsThresholdText;
|
||||
@SerializedName("rewards_value")
|
||||
private String rewardsValue;
|
||||
@SerializedName("battle_pass_level")
|
||||
private int battlePassLevel;
|
||||
@SerializedName("exchange_quantity")
|
||||
private int exchangeQuantity;
|
||||
@SerializedName("live_battle_pass_type_id")
|
||||
private int liveBattlePassTypeId;
|
||||
private String description;
|
||||
@SerializedName("restrict_time")
|
||||
private int restrictTime;
|
||||
private int sort;
|
||||
@SerializedName("exchange_status")
|
||||
private int exchangeStatus;
|
||||
@SerializedName("user_quinty_count")
|
||||
private int userQuintyCount;
|
||||
@SerializedName("exchange_status_remark")
|
||||
private String exchangeMark;
|
||||
|
||||
public BattlePassPoints() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getRewardsName() {
|
||||
return rewardsName;
|
||||
}
|
||||
|
||||
public void setRewardsName(String rewardsName) {
|
||||
this.rewardsName = rewardsName;
|
||||
}
|
||||
|
||||
public int getRewardsId() {
|
||||
return rewardsId;
|
||||
}
|
||||
|
||||
public void setRewardsId(int rewardsId) {
|
||||
this.rewardsId = rewardsId;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public String getPointsThreshold() {
|
||||
return pointsThreshold;
|
||||
}
|
||||
|
||||
public void setPointsThreshold(String pointsThreshold) {
|
||||
this.pointsThreshold = pointsThreshold;
|
||||
}
|
||||
|
||||
public String getRewardsValue() {
|
||||
return rewardsValue;
|
||||
}
|
||||
|
||||
public void setRewardsValue(String rewardsValue) {
|
||||
this.rewardsValue = rewardsValue;
|
||||
}
|
||||
|
||||
public int getBattlePassLevel() {
|
||||
return battlePassLevel;
|
||||
}
|
||||
|
||||
public void setBattlePassLevel(int battlePassLevel) {
|
||||
this.battlePassLevel = battlePassLevel;
|
||||
}
|
||||
|
||||
public int getExchangeQuantity() {
|
||||
return exchangeQuantity;
|
||||
}
|
||||
|
||||
public void setExchangeQuantity(int exchangeQuantity) {
|
||||
this.exchangeQuantity = exchangeQuantity;
|
||||
}
|
||||
|
||||
public int getLiveBattlePassTypeId() {
|
||||
return liveBattlePassTypeId;
|
||||
}
|
||||
|
||||
public void setLiveBattlePassTypeId(int liveBattlePassTypeId) {
|
||||
this.liveBattlePassTypeId = liveBattlePassTypeId;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public int getRestrictTime() {
|
||||
return restrictTime;
|
||||
}
|
||||
|
||||
public void setRestrictTime(int restrictTime) {
|
||||
this.restrictTime = restrictTime;
|
||||
}
|
||||
|
||||
public int getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(int sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public int getExchangeStatus() {
|
||||
return exchangeStatus;
|
||||
}
|
||||
|
||||
public void setExchangeStatus(int exchangeStatus) {
|
||||
this.exchangeStatus = exchangeStatus;
|
||||
}
|
||||
|
||||
public int getUserQuintyCount() {
|
||||
return userQuintyCount;
|
||||
}
|
||||
|
||||
public void setUserQuintyCount(int userQuintyCount) {
|
||||
this.userQuintyCount = userQuintyCount;
|
||||
}
|
||||
|
||||
public String getExchangeMark() {
|
||||
return exchangeMark;
|
||||
}
|
||||
|
||||
public void setExchangeMark(String exchangeMark) {
|
||||
this.exchangeMark = exchangeMark;
|
||||
}
|
||||
|
||||
public String getPointsThresholdText() {
|
||||
return pointsThresholdText;
|
||||
}
|
||||
|
||||
public void setPointsThresholdText(String pointsThresholdText) {
|
||||
this.pointsThresholdText = pointsThresholdText;
|
||||
}
|
||||
}
|
157
common/src/main/java/com/yunbao/common/bean/BattlePassTask.java
Normal file
@ -0,0 +1,157 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BattlePassTask extends BaseModel {
|
||||
private List<Task> daily;// 每日任务
|
||||
private List<Task> season;// 每期任务
|
||||
|
||||
public BattlePassTask() {
|
||||
}
|
||||
|
||||
public List<Task> getDaily() {
|
||||
return daily;
|
||||
}
|
||||
|
||||
public void setDaily(List<Task> daily) {
|
||||
this.daily = daily;
|
||||
}
|
||||
|
||||
public List<Task> getSeason() {
|
||||
return season;
|
||||
}
|
||||
|
||||
public void setSeason(List<Task> season) {
|
||||
this.season = season;
|
||||
}
|
||||
|
||||
public static class Task {
|
||||
private int id;// 任务ID
|
||||
private String type;// 任务类型
|
||||
@SerializedName("task_success")
|
||||
private int taskSuccess;// 任务可以重复的次数
|
||||
@SerializedName("name_en")
|
||||
private String nameEn;// 任务名称英文
|
||||
@SerializedName("remark_en")
|
||||
private String remarkEn;// 任务备注英文
|
||||
private String name;// 任务名称中文
|
||||
private String remark; // 任务备注中文
|
||||
@SerializedName("image_path")
|
||||
private String imagePath;// 图标path
|
||||
@SerializedName("user_task_success")
|
||||
private int userTaskSuccess;// 用户完成的任务次数
|
||||
@SerializedName("received_task")
|
||||
private int receivedTask;// 用户已经领取的任务数量
|
||||
@SerializedName("not_received_task")
|
||||
private int notReceivedTask; // 用户未领取的任务数量
|
||||
public boolean isBuy(){
|
||||
return taskSuccess==0;
|
||||
}
|
||||
public String getNameText(){
|
||||
return WordUtil.isNewZh()?name:nameEn;
|
||||
}
|
||||
public String getRemarkText(){
|
||||
return WordUtil.isNewZh()?remark:remarkEn;
|
||||
}
|
||||
|
||||
public Task() {
|
||||
}
|
||||
|
||||
public Task(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getTaskSuccess() {
|
||||
return taskSuccess;
|
||||
}
|
||||
|
||||
public void setTaskSuccess(int taskSuccess) {
|
||||
this.taskSuccess = taskSuccess;
|
||||
}
|
||||
|
||||
public String getNameEn() {
|
||||
return nameEn;
|
||||
}
|
||||
|
||||
public void setNameEn(String nameEn) {
|
||||
this.nameEn = nameEn;
|
||||
}
|
||||
|
||||
public String getRemarkEn() {
|
||||
return remarkEn;
|
||||
}
|
||||
|
||||
public void setRemarkEn(String remarkEn) {
|
||||
this.remarkEn = remarkEn;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getImagePath() {
|
||||
return imagePath;
|
||||
}
|
||||
|
||||
public void setImagePath(String imagePath) {
|
||||
this.imagePath = imagePath;
|
||||
}
|
||||
|
||||
public int getUserTaskSuccess() {
|
||||
return userTaskSuccess;
|
||||
}
|
||||
|
||||
public void setUserTaskSuccess(int userTaskSuccess) {
|
||||
this.userTaskSuccess = userTaskSuccess;
|
||||
}
|
||||
|
||||
public int getReceivedTask() {
|
||||
return receivedTask;
|
||||
}
|
||||
|
||||
public void setReceivedTask(int receivedTask) {
|
||||
this.receivedTask = receivedTask;
|
||||
}
|
||||
|
||||
public int getNotReceivedTask() {
|
||||
return notReceivedTask;
|
||||
}
|
||||
|
||||
public void setNotReceivedTask(int notReceivedTask) {
|
||||
this.notReceivedTask = notReceivedTask;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,156 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BattlePassUserInfoBean extends BaseModel{
|
||||
private String uid;
|
||||
private int points;
|
||||
@SerializedName("battle_pass_exp")
|
||||
private int battlePassExp;
|
||||
@SerializedName("battle_pass_user_records_1")
|
||||
private int battlePassUserRecords1;
|
||||
@SerializedName("battle_pass_user_records_2")
|
||||
private int battlePassUserRecords2;
|
||||
@SerializedName("battle_pass_user_records_3")
|
||||
private int battlePassUserRecords3;
|
||||
private int level;
|
||||
@SerializedName("last_level_exp")
|
||||
private int lastLevelExp;
|
||||
@SerializedName("next_level_exp")
|
||||
private int nextLevelExp;
|
||||
private String id;
|
||||
@SerializedName("battle_pass_name")
|
||||
private String battlePassName;
|
||||
@SerializedName("start_time")
|
||||
private String startTime;
|
||||
@SerializedName("end_time")
|
||||
private String endTime;
|
||||
@SerializedName("battle_pass_status")
|
||||
private boolean battlePassStatus;
|
||||
|
||||
private List<LiveBattlePassRewardsBean.BattlePassType> live_battle_pass_type;
|
||||
|
||||
public BattlePassUserInfoBean() {
|
||||
}
|
||||
public List<LiveBattlePassRewardsBean.BattlePassType> getLive_battle_pass_type() {
|
||||
return live_battle_pass_type;
|
||||
}
|
||||
|
||||
public void setLive_battle_pass_type(List<LiveBattlePassRewardsBean.BattlePassType> live_battle_pass_type) {
|
||||
this.live_battle_pass_type = live_battle_pass_type;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getPoints() {
|
||||
return points;
|
||||
}
|
||||
|
||||
public void setPoints(int points) {
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
public int getBattlePassExp() {
|
||||
return battlePassExp;
|
||||
}
|
||||
|
||||
public void setBattlePassExp(int battlePassExp) {
|
||||
this.battlePassExp = battlePassExp;
|
||||
}
|
||||
|
||||
public int getBattlePassUserRecords1() {
|
||||
return battlePassUserRecords1;
|
||||
}
|
||||
|
||||
public void setBattlePassUserRecords1(int battlePassUserRecords1) {
|
||||
this.battlePassUserRecords1 = battlePassUserRecords1;
|
||||
}
|
||||
|
||||
public int getBattlePassUserRecords2() {
|
||||
return battlePassUserRecords2;
|
||||
}
|
||||
|
||||
public void setBattlePassUserRecords2(int battlePassUserRecords2) {
|
||||
this.battlePassUserRecords2 = battlePassUserRecords2;
|
||||
}
|
||||
|
||||
public int getBattlePassUserRecords3() {
|
||||
return battlePassUserRecords3;
|
||||
}
|
||||
|
||||
public void setBattlePassUserRecords3(int battlePassUserRecords3) {
|
||||
this.battlePassUserRecords3 = battlePassUserRecords3;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getLastLevelExp() {
|
||||
return lastLevelExp;
|
||||
}
|
||||
|
||||
public void setLastLevelExp(int lastLevelExp) {
|
||||
this.lastLevelExp = lastLevelExp;
|
||||
}
|
||||
|
||||
public int getNextLevelExp() {
|
||||
return nextLevelExp;
|
||||
}
|
||||
|
||||
public void setNextLevelExp(int nextLevelExp) {
|
||||
this.nextLevelExp = nextLevelExp;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getBattlePassName() {
|
||||
return battlePassName;
|
||||
}
|
||||
|
||||
public void setBattlePassName(String battlePassName) {
|
||||
this.battlePassName = battlePassName;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public boolean isBattlePassStatus() {
|
||||
return battlePassStatus;
|
||||
}
|
||||
|
||||
public void setBattlePassStatus(boolean battlePassStatus) {
|
||||
this.battlePassStatus = battlePassStatus;
|
||||
}
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class LiveBattlePassRewardsBean extends BaseModel{
|
||||
private int level;
|
||||
private List<BattlePassType> live_battle_pass_type;
|
||||
private Map<Integer,Map<Integer,LiveBattlePassReward>> live_battle_pass_rewards;
|
||||
|
||||
public LiveBattlePassRewardsBean() {
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public List<BattlePassType> getLive_battle_pass_type() {
|
||||
return live_battle_pass_type;
|
||||
}
|
||||
|
||||
public void setLive_battle_pass_type(List<BattlePassType> live_battle_pass_type) {
|
||||
this.live_battle_pass_type = live_battle_pass_type;
|
||||
}
|
||||
|
||||
public Map<Integer,Map<Integer,LiveBattlePassReward>> getLive_battle_pass_rewards() {
|
||||
return live_battle_pass_rewards;
|
||||
}
|
||||
|
||||
public void setLive_battle_pass_rewards(Map<Integer,Map<Integer,LiveBattlePassReward>> live_battle_pass_rewards) {
|
||||
this.live_battle_pass_rewards = live_battle_pass_rewards;
|
||||
}
|
||||
|
||||
public static class BattlePassType extends BaseModel{
|
||||
private int id;
|
||||
private String battle_pass_name;
|
||||
private int sort;
|
||||
private int diamond_value;
|
||||
private int lock;
|
||||
|
||||
public BattlePassType() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getBattle_pass_name() {
|
||||
return battle_pass_name;
|
||||
}
|
||||
|
||||
public void setBattle_pass_name(String battle_pass_name) {
|
||||
this.battle_pass_name = battle_pass_name;
|
||||
}
|
||||
|
||||
public int getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(int sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public int getDiamond_value() {
|
||||
return diamond_value;
|
||||
}
|
||||
|
||||
public void setDiamond_value(int diamond_value) {
|
||||
this.diamond_value = diamond_value;
|
||||
}
|
||||
|
||||
public int getLock() {
|
||||
return lock;
|
||||
}
|
||||
|
||||
public void setLock(int lock) {
|
||||
this.lock = lock;
|
||||
}
|
||||
}
|
||||
public static class LiveBattlePassReward extends BaseModel{
|
||||
private int id;
|
||||
@SerializedName("live_battle_pass_level")
|
||||
private int liveBattlePassLevel;
|
||||
@SerializedName("live_battle_pass_type_id")
|
||||
private int liveBattlePassTypeId;
|
||||
@SerializedName("reward_name")
|
||||
private String rewardName;
|
||||
@SerializedName("image_url")
|
||||
private String imageUrl;
|
||||
private int lock;
|
||||
private int received;
|
||||
|
||||
public LiveBattlePassReward() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getLiveBattlePassLevel() {
|
||||
return liveBattlePassLevel;
|
||||
}
|
||||
|
||||
public void setLiveBattlePassLevel(int liveBattlePassLevel) {
|
||||
this.liveBattlePassLevel = liveBattlePassLevel;
|
||||
}
|
||||
|
||||
public int getLiveBattlePassTypeId() {
|
||||
return liveBattlePassTypeId;
|
||||
}
|
||||
|
||||
public void setLiveBattlePassTypeId(int liveBattlePassTypeId) {
|
||||
this.liveBattlePassTypeId = liveBattlePassTypeId;
|
||||
}
|
||||
|
||||
public String getRewardName() {
|
||||
return rewardName;
|
||||
}
|
||||
|
||||
public void setRewardName(String rewardName) {
|
||||
this.rewardName = rewardName;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public void setImageUrl(String imageUrl) {
|
||||
this.imageUrl = imageUrl;
|
||||
}
|
||||
|
||||
public int getLock() {
|
||||
return lock;
|
||||
}
|
||||
|
||||
public void setLock(int lock) {
|
||||
this.lock = lock;
|
||||
}
|
||||
|
||||
public int getReceived() {
|
||||
return received;
|
||||
}
|
||||
|
||||
public void setReceived(int received) {
|
||||
this.received = received;
|
||||
}
|
||||
}
|
||||
}
|
@ -3,6 +3,7 @@ package com.yunbao.common.dialog;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
@ -11,6 +12,7 @@ import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class ActivateEliteBattleOrderPopupWindow extends CenterPopupView {
|
||||
@ -45,12 +47,16 @@ public class ActivateEliteBattleOrderPopupWindow extends CenterPopupView {
|
||||
findViewById(R.id.gift_overvalue).setVisibility(VISIBLE);
|
||||
findViewById(R.id.gift_overvalue3).setVisibility(GONE);
|
||||
findViewById(R.id.enjoy_image).setVisibility(GONE);
|
||||
findViewById(R.id.elites_image).setVisibility(VISIBLE);
|
||||
findViewById(R.id.gift_overvalue).setVisibility(VISIBLE);
|
||||
((TextView)findViewById(R.id.gift3_text)).setText(WordUtil.getNewString(R.string.gift_overvalue));
|
||||
} else {
|
||||
findViewById(R.id.gift_overvalue).setVisibility(GONE);
|
||||
findViewById(R.id.gift_overvalue3).setVisibility(VISIBLE);
|
||||
findViewById(R.id.enjoy_image).setVisibility(VISIBLE);
|
||||
findViewById(R.id.elites_image).setVisibility(GONE);
|
||||
findViewById(R.id.gift_overvalue).setVisibility(GONE);
|
||||
((TextView)findViewById(R.id.gift3_text)).setText(WordUtil.getNewString(R.string.gift_overvalue3));
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.war_order_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
@ -61,7 +67,7 @@ public class ActivateEliteBattleOrderPopupWindow extends CenterPopupView {
|
||||
//中文按钮文字
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(spendMoney)
|
||||
.append("鑽開通");
|
||||
.append(WordUtil.isNewZh()?"鑽開通":"Activate ");
|
||||
buttonWarOrder.setText(stringBuffer.toString());
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(buttonWarOrder, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
|
@ -14,6 +14,7 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.http.ResponseModel;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class LiberalBattlePassPopupWindow extends CenterPopupView {
|
||||
@ -42,8 +43,10 @@ public class LiberalBattlePassPopupWindow extends CenterPopupView {
|
||||
liberalBattlePass = findViewById(R.id.liberal_battle_pass);
|
||||
//中文版
|
||||
StringBuffer liberalBattlePassHint = new StringBuffer();
|
||||
liberalBattlePassHint.append("是否花費");
|
||||
liberalBattlePassHint.append(spendMoney).append(mElites ? "鑽石開通精英戰令!" : "鑽石開通尊享戰令!");
|
||||
liberalBattlePassHint.append(WordUtil.isNewZh()?"是否花費":"Did you spend ");
|
||||
liberalBattlePassHint.append(spendMoney).append(mElites ?
|
||||
WordUtil.isNewZh()?"鑽石開通精英戰令!":"diamonds to activate the Elite BattlePass":
|
||||
WordUtil.isNewZh()?"鑽石開通尊享戰令!":"diamonds to activate the Luxury BattlePass");
|
||||
//英文版
|
||||
|
||||
//设置样式
|
||||
|
@ -1,16 +1,20 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.CenterPopupView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
|
||||
public class RuleOfWarPopupWindow extends CenterPopupView {
|
||||
public RuleOfWarPopupWindow(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
private TextView rule;
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.rule_of_war_popup;
|
||||
@ -20,5 +24,21 @@ public class RuleOfWarPopupWindow extends CenterPopupView {
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
rule=findViewById(R.id.rule);
|
||||
initData();
|
||||
}
|
||||
private void initData(){
|
||||
LiveNetManager.get(getContext())
|
||||
.getBattlePassRule(new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
rule.setText(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class WarOrderExchangeDetailsPopupWindow extends CenterPopupView {
|
||||
pointExchange = findViewById(R.id.point_exchange);
|
||||
orderLevel.setText(buyExp);
|
||||
BigDecimal needExpBigDecimal = new BigDecimal(buyExp).multiply(new BigDecimal(mScale));
|
||||
pointExchange.setText(String.format(WordUtil.getString(R.string.point_exchange), needExpBigDecimal.toString()));
|
||||
pointExchange.setText(String.format("%s",needExpBigDecimal));
|
||||
ImgLoader.display(getContext(), mImageUrl, exchangeParticulars);
|
||||
findViewById(R.id.sub).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
@ -74,7 +74,7 @@ public class WarOrderExchangeDetailsPopupWindow extends CenterPopupView {
|
||||
buyExp = String.valueOf(buyExpBigDecimal.intValue());
|
||||
orderLevel.setText(buyExp);
|
||||
BigDecimal needExpBigDecimal = buyExpBigDecimal.multiply(new BigDecimal(mScale));
|
||||
pointExchange.setText(String.format(WordUtil.getString(R.string.point_exchange), needExpBigDecimal.toString()));
|
||||
pointExchange.setText(String.format("%s",needExpBigDecimal));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -88,10 +88,16 @@ public class WarOrderExchangeDetailsPopupWindow extends CenterPopupView {
|
||||
buyExp = String.valueOf(buyExpBigDecimal.intValue());
|
||||
orderLevel.setText(buyExp);
|
||||
BigDecimal needExpBigDecimal = buyExpBigDecimal.multiply(new BigDecimal(mScale));
|
||||
pointExchange.setText(String.format(WordUtil.getString(R.string.point_exchange), needExpBigDecimal.toString()));
|
||||
pointExchange.setText(String.format("%s",needExpBigDecimal));
|
||||
}
|
||||
}
|
||||
});
|
||||
findViewById(R.id.war_order_close).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.point_exchange_linear), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
@ -70,6 +70,13 @@ public abstract class BaseFragment extends Fragment {
|
||||
* 请求数据
|
||||
*/
|
||||
protected abstract void loadData();
|
||||
public void updateData(){
|
||||
|
||||
}
|
||||
|
||||
protected <T extends View> T findViewById(int id){
|
||||
return contentView.findViewById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
|
@ -5,6 +5,9 @@ import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.BattlePassPoints;
|
||||
import com.yunbao.common.bean.BattlePassTask;
|
||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CheckRemainingBalance;
|
||||
@ -31,6 +34,7 @@ import com.yunbao.common.bean.ListInfoMessageModel;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
@ -1109,4 +1113,22 @@ public interface PDLiveApi {
|
||||
@Query("battle_pass_points_id") String battlePassPointsId,
|
||||
@Query("count") String count
|
||||
);
|
||||
@GET("/api/public/?service=Livebattlepass.getBattlePassUserInfo")
|
||||
Observable<ResponseModel<BattlePassUserInfoBean>> getBattlePassUserInfo();
|
||||
|
||||
@GET("/api/public/?service=Livebattlepass.getLiveBattlePassRewards")
|
||||
Observable<ResponseModel<LiveBattlePassRewardsBean>> getLiveBattlePassRewards();
|
||||
@GET("/api/public/?service=Livebattlepass.getRewards")
|
||||
Observable<ResponseModel<List<BaseModel>>> getRewards(
|
||||
@Query("live_battle_pass_level_id")String rewardLevelId,
|
||||
@Query("live_battle_pass_rewards_id")String rewardId
|
||||
);
|
||||
@GET("/api/public/?service=Livebattlepass.getBattlePassTask")
|
||||
Observable<ResponseModel<BattlePassTask>> getBattlePassTask();
|
||||
@GET("/api/public/?service=Livebattlepass.getTask")
|
||||
Observable<ResponseModel<List<BaseModel>>> getTask(@Query("task_id")String taskId);
|
||||
@GET("/api/public/?service=Livebattlepass.getBattlePassPoints")
|
||||
Observable<ResponseModel<List<BattlePassPoints>>> getBattlePassPoints();
|
||||
@GET("/api/public/?service=Livebattlepass.battlePassRule")
|
||||
Observable<ResponseModel<String>> battlePassRule();
|
||||
}
|
||||
|
@ -8,6 +8,9 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.ActiveModel;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.BattlePassPoints;
|
||||
import com.yunbao.common.bean.BattlePassTask;
|
||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.bean.BlindBoxInfoModel;
|
||||
import com.yunbao.common.bean.CheckLiveModel;
|
||||
import com.yunbao.common.bean.CheckRemainingBalance;
|
||||
@ -31,6 +34,7 @@ import com.yunbao.common.bean.ListInfoMessageModel;
|
||||
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||
import com.yunbao.common.bean.LiveDataInfoModel;
|
||||
import com.yunbao.common.bean.LiveInfoModel;
|
||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
@ -2615,6 +2619,144 @@ public class LiveNetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getBattlePassUserInfo(HttpCallback<BattlePassUserInfoBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getBattlePassUserInfo()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(checkRemainingBalanceResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(checkRemainingBalanceResponseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getLiveBattlePassRewards(HttpCallback<LiveBattlePassRewardsBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getLiveBattlePassRewards()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(checkRemainingBalanceResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(checkRemainingBalanceResponseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRewards(String rewardLevelId,String rewardId,HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRewards(rewardLevelId, rewardId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getBattlePassTask(HttpCallback<BattlePassTask> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getBattlePassTask()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(checkRemainingBalanceResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(checkRemainingBalanceResponseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getBattlePassTaskOver(String taskId,HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getTask(taskId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(new HttpCallbackModel(responseModel.getData().getCode(), responseModel.getData().getMsg()));
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getBattlePassPoints(HttpCallback<List<BattlePassPoints>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getBattlePassPoints()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(checkRemainingBalanceResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(checkRemainingBalanceResponseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
public void getBattlePassRule(HttpCallback<String> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.battlePassRule()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(checkRemainingBalanceResponseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(checkRemainingBalanceResponseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
|
@ -45,6 +45,7 @@ public class RouteUtil {
|
||||
public static final String PATH_RED_PACKET_INFO = "/main/RedPacketInfoActivity";
|
||||
public static final String PATH_RED_PACKET_USER = "/main/RedPacketUsersActivity";
|
||||
public static final String PATH_SELECT_AVATAR="/main/UserAvatarSelectActivity";
|
||||
public static final String PATH_BattlePassActivity="/main/BattlePassActivity";
|
||||
|
||||
public static void forwardFansActivity(String uid) {
|
||||
ARouter.getInstance().build(PATH_FANSACTIVITY)
|
||||
@ -315,4 +316,12 @@ public class RouteUtil {
|
||||
ARouter.getInstance().build(PATH_SELECT_AVATAR)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 战令
|
||||
*/
|
||||
public static void forwardBattlePass(){
|
||||
ARouter.getInstance().build(PATH_BattlePassActivity)
|
||||
.navigation();
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,8 @@ public class WordUtil {
|
||||
}
|
||||
|
||||
public static boolean isNewZh() {
|
||||
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE;
|
||||
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE
|
||||
|| IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.TRADITIONAL_CHINESE ;
|
||||
}
|
||||
|
||||
public static String getNewString(int res) {
|
||||
|
@ -38,7 +38,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="28dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="15dp">
|
||||
|
||||
<LinearLayout
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_overvalue"
|
||||
android:layout_width="71dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
@ -66,7 +66,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_overvalue3"
|
||||
android:layout_width="71dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
@ -109,7 +109,8 @@
|
||||
android:src="@mipmap/icon_war_order_gift" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:id="@+id/gift3_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center"
|
||||
@ -122,6 +123,8 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/has_reached_level_after_opening"
|
||||
|
@ -38,21 +38,27 @@
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp">
|
||||
android:layout_marginTop="25dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_quintessence"
|
||||
android:layout_width="116dp"
|
||||
android:layout_height="38dp"
|
||||
android:text="@string/upgrade_elite_type1"
|
||||
android:textColor="#F36100"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginStart="34dp"
|
||||
android:background="@mipmap/button_quintessence" />
|
||||
android:background="@mipmap/bg_dialog_battlepass_btn" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_enjoy"
|
||||
android:layout_width="116dp"
|
||||
android:layout_height="38dp"
|
||||
android:text="@string/upgrade_elite_type2"
|
||||
android:textColor="#F36100"
|
||||
android:textSize="14sp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="34dp"
|
||||
android:background="@mipmap/button_enjoy" />
|
||||
android:background="@mipmap/bg_dialog_battlepass_btn" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
@ -2,6 +2,7 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginStart="17dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
android:orientation="vertical">
|
||||
@ -17,6 +18,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:src="@mipmap/icon_order_rule" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
@ -27,64 +29,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/rule"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:text="@string/rule_of_war_hint1"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:text="@string/rule_of_war_hint2"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:text="@string/rule_of_war_hint3"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:text="@string/rule_of_war_hint4"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:text="@string/rule_of_war_hint5"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
android:text="@string/rule_of_war_hint6"
|
||||
android:textColor="#0D21B2"
|
||||
tools:text="1.戰令開啟時,完成戰令任務,提升戰令等級,可獲得大量等級獎勵。\n2.所有用戶免費解鎖普通版,戰令開啟時隨時可進階為精英版和尊享版,獲得豐厚額外專屬獎勵。\n3.三種戰令都會獎勵積分,可在兌換商城中兌換心儀的寶貝,部分寶貝兌換有戰令等級要求或兌換數量限制。\n4.每日任務0點刷新,未完成任務進度不再累計,每季任務將會在新一季戰令開啟時刷新。\n5.任務達成時需主動領取經驗,未领取經驗將會在任務刷新時過期。\n6.活動最終解釋權歸PDLIVE所有。"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="282dp"
|
||||
android:layout_marginStart="17dp"
|
||||
@ -23,15 +24,22 @@
|
||||
android:text="@string/exchange_particulars"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:background="@mipmap/bg_dialog_battlepass_exchange"
|
||||
android:layout_width="99dp"
|
||||
android:layout_height="99dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="19dp">
|
||||
<ImageView
|
||||
android:id="@+id/exchange_particulars"
|
||||
android:layout_width="99dp"
|
||||
android:layout_height="99dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="19dp"
|
||||
android:src="@drawable/background_wish_item" />
|
||||
android:scaleType="centerCrop"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
@ -96,8 +104,22 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text="@string/point_exchange"
|
||||
android:textColor="#E03600"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="14sp"
|
||||
tools:text="123" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="21dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:src="@mipmap/ic_integral" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:textColor="#E03600"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/point_exchange2" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 41 KiB |
BIN
common/src/main/res/mipmap-b+en+us/icon_order_rule.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/bg_dialog_battlepass_btn.png
Normal file
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 71 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/ic_integral.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
@ -1396,4 +1396,27 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="rule_of_war_hint1">1. When the BattlePass is activated, completing the BattlePass task and increasing the BattlePass level can earn a large amount of level rewards.\n</string>
|
||||
<string name="rule_of_war_hint2">2. All users can unlock the regular version for free, and when the BattlePass is activated, they can upgrade to the elite version and the luxury version at any time, and receive rich additional exclusive rewards.\n</string>
|
||||
|
||||
|
||||
<string name="upgrade_elite">Upgrade Elite/Luxury BattlePass</string>
|
||||
<string name="upgrade_elite_type1">Upgrade Elite BattlePass</string>
|
||||
<string name="upgrade_elite_type2">Upgrade Luxury BattlePass</string>
|
||||
<string name="upgrade_elite2">You can receive a massive amount of points and exchange more rewards</string>
|
||||
<string name="rule_of_war_hint3">3.三種戰令都會獎勵積分,可在兌換商城中兌換心 儀的寶貝,部分寶貝兌換有戰令等級要求或兌換數 量限制。</string>
|
||||
<string name="rule_of_war_hint4">4.每日任務0點刷新,未完成任務進度不再累計, 每季任務將會在新一季戰令開啟時刷新。</string>
|
||||
<string name="rule_of_war_hint5">5.任務達成時需主動領取經驗,未领取經驗將會在 任務刷新時自动领取。</string>
|
||||
<string name="rule_of_war_hint6">6.活動最終解釋權歸PDLIVE所有。</string>
|
||||
<string name="more_integral">More points</string>
|
||||
<string name="gift_overvalue">Gifts worth over 200%</string>
|
||||
<string name="gift_overvalue3">Gifts worth over 300%</string>
|
||||
<string name="unlock_more_gifts">More Rare outfits</string>
|
||||
<string name="unlock_more_gifts2">More Collectible outfits</string>
|
||||
<string name="has_reached_level_after_opening">After opened,the rewards that have reached will be automatically unlocked!</string>
|
||||
<string name="order_level">My level</string>
|
||||
<string name="buying_experience_point">Purchase experience value:</string>
|
||||
<string name="buying_experience">Buy</string>
|
||||
<string name="this_activity_is_over">This activity has ended. Please collect the unclaimed rewards as soon as possible.Points can be reserved for future use</string>
|
||||
<string name="exchange_particulars">Exchange Details</string>
|
||||
<string name="point_exchange">%s(points) exchange</string>
|
||||
<string name="point_exchange2">exchange</string>
|
||||
<string name="point_exchange_number">Quantity:</string>
|
||||
</resources>
|
||||
|
@ -1396,4 +1396,23 @@
|
||||
<string name="rule_of_war_hint4">4.每日任務0點刷新,未完成任務進度不再累計, 每季任務將會在新一季戰令開啟時刷新。</string>
|
||||
<string name="rule_of_war_hint5">5.任務達成時需主動領取經驗,未领取經驗將會在 任務刷新時自动领取。</string>
|
||||
<string name="rule_of_war_hint6">6.活動最終解釋權歸PDLIVE所有。</string>
|
||||
|
||||
<string name="upgrade_elite">升級精英/尊享戰令</string>
|
||||
<string name="upgrade_elite_type1">升級精英戰令</string>
|
||||
<string name="upgrade_elite_type2">升級尊享戰令</string>
|
||||
<string name="upgrade_elite2">可領取海量積分,兌換更多獎勵</string>
|
||||
<string name="more_integral">更多積分</string>
|
||||
<string name="gift_overvalue">禮物價值超 200%</string>
|
||||
<string name="gift_overvalue3">禮物價值超 300%</string>
|
||||
<string name="unlock_more_gifts">解鎖更多禮物 和全套珍稀裝扮</string>
|
||||
<string name="unlock_more_gifts2">解鎖更多禮物 和全套典藏裝扮</string>
|
||||
<string name="has_reached_level_after_opening">開通后已達到等級的獎勵將會自動解鎖!</string>
|
||||
<string name="order_level">我的等級</string>
|
||||
<string name="buying_experience_point">購買經驗值:</string>
|
||||
<string name="buying_experience">購買</string>
|
||||
<string name="this_activity_is_over">本期活動已結束,請儘快領取未領取的獎勵積分可保留下次使用</string>
|
||||
<string name="exchange_particulars">兌換詳情</string>
|
||||
<string name="point_exchange">%s(積分) 兌換</string>
|
||||
<string name="point_exchange2">兌換</string>
|
||||
<string name="point_exchange_number">數量:</string>
|
||||
</resources>
|
||||
|
@ -1395,4 +1395,23 @@
|
||||
<string name="rule_of_war_hint4">4.每日任務0點刷新,未完成任務進度不再累計, 每季任務將會在新一季戰令開啟時刷新。</string>
|
||||
<string name="rule_of_war_hint5">5.任務達成時需主動領取經驗,未领取經驗將會在 任務刷新時自动领取。</string>
|
||||
<string name="rule_of_war_hint6">6.活動最終解釋權歸PDLIVE所有。</string>
|
||||
|
||||
<string name="upgrade_elite">升級精英/尊享戰令</string>
|
||||
<string name="upgrade_elite_type1">升級精英戰令</string>
|
||||
<string name="upgrade_elite_type2">升級尊享戰令</string>
|
||||
<string name="upgrade_elite2">可領取海量積分,兌換更多獎勵</string>
|
||||
<string name="more_integral">更多積分</string>
|
||||
<string name="gift_overvalue">禮物價值超 200%</string>
|
||||
<string name="gift_overvalue3">禮物價值超 300%</string>
|
||||
<string name="unlock_more_gifts">解鎖更多禮物 和全套珍稀裝扮</string>
|
||||
<string name="unlock_more_gifts2">解鎖更多禮物 和全套典藏裝扮</string>
|
||||
<string name="has_reached_level_after_opening">開通后已達到等級的獎勵將會自動解鎖!</string>
|
||||
<string name="order_level">我的等級</string>
|
||||
<string name="buying_experience_point">購買經驗值:</string>
|
||||
<string name="buying_experience">購買</string>
|
||||
<string name="this_activity_is_over">本期活動已結束,請儘快領取未領取的獎勵積分可保留下次使用</string>
|
||||
<string name="exchange_particulars">兌換詳情</string>
|
||||
<string name="point_exchange">%s(積分) 兌換</string>
|
||||
<string name="point_exchange2">兌換</string>
|
||||
<string name="point_exchange_number">數量:</string>
|
||||
</resources>
|
||||
|
@ -1396,4 +1396,22 @@
|
||||
<string name="rule_of_war_hint5">5.任務達成時需主動領取經驗,未领取經驗將會在 任務刷新時自动领取。</string>
|
||||
<string name="rule_of_war_hint6">6.活動最終解釋權歸PDLIVE所有。</string>
|
||||
|
||||
<string name="upgrade_elite">升級精英/尊享戰令</string>
|
||||
<string name="upgrade_elite_type1">升級精英戰令</string>
|
||||
<string name="upgrade_elite_type2">升級尊享戰令</string>
|
||||
<string name="upgrade_elite2">可領取海量積分,兌換更多獎勵</string>
|
||||
<string name="more_integral">更多積分</string>
|
||||
<string name="gift_overvalue">禮物價值超 200%</string>
|
||||
<string name="gift_overvalue3">禮物價值超 300%</string>
|
||||
<string name="unlock_more_gifts">解鎖更多禮物 和全套珍稀裝扮</string>
|
||||
<string name="unlock_more_gifts2">解鎖更多禮物 和全套典藏裝扮</string>
|
||||
<string name="has_reached_level_after_opening">開通后已達到等級的獎勵將會自動解鎖!</string>
|
||||
<string name="order_level">我的等級</string>
|
||||
<string name="buying_experience_point">購買經驗值:</string>
|
||||
<string name="buying_experience">購買</string>
|
||||
<string name="this_activity_is_over">本期活動已結束,請儘快領取未領取的獎勵積分可保留下次使用</string>
|
||||
<string name="exchange_particulars">兌換詳情</string>
|
||||
<string name="point_exchange">%s(積分) 兌換</string>
|
||||
<string name="point_exchange2">兌換</string>
|
||||
<string name="point_exchange_number">數量:</string>
|
||||
</resources>
|
||||
|
@ -1396,25 +1396,29 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="conversion_quantity_need_of_use1">1.One star coin can be exchanged for one ticket. You can customize the exchange quantity according to your needs. Once the ticket is exchanged, it cannot be revoked. Please confirm in advance;</string>
|
||||
<string name="conversion_quantity_need_of_use2">2.One ticket can be used to watch one episode of a short drama. After successful redemption, you can return to the viewing page and use the ticket to continue watching the movie;</string>
|
||||
<string name="conversion_quantity_need_of_use3">3.Ticket prohibit illegal activities such as offline trading and acquisitions, and PDLIVE will crack down severely on various profit-making trading activities.</string>
|
||||
<string name="upgrade_elite">升級精英/尊享戰令</string>
|
||||
<string name="upgrade_elite2">可領取海量積分,兌換更多獎勵</string>
|
||||
<string name="upgrade_elite">Upgrade Elite/Luxury BattlePass</string>
|
||||
<string name="upgrade_elite_type1">Upgrade Elite BattlePass</string>
|
||||
<string name="upgrade_elite_type2">Upgrade Luxury BattlePass</string>
|
||||
<string name="upgrade_elite2">You can receive a massive amount of points and exchange more rewards</string>
|
||||
<string name="rule_of_war_hint1">1. When the BattlePass is activated, completing the BattlePass task and increasing the BattlePass level can earn a large amount of level rewards.\n</string>
|
||||
<string name="rule_of_war_hint2">2. All users can unlock the regular version for free, and when the BattlePass is activated, they can upgrade to the elite version and the luxury version at any time, and receive rich additional exclusive rewards.\n</string>
|
||||
<string name="rule_of_war_hint3">3.三種戰令都會獎勵積分,可在兌換商城中兌換心 儀的寶貝,部分寶貝兌換有戰令等級要求或兌換數 量限制。</string>
|
||||
<string name="rule_of_war_hint4">4.每日任務0點刷新,未完成任務進度不再累計, 每季任務將會在新一季戰令開啟時刷新。</string>
|
||||
<string name="rule_of_war_hint5">5.任務達成時需主動領取經驗,未领取經驗將會在 任務刷新時自动领取。</string>
|
||||
<string name="rule_of_war_hint6">6.活動最終解釋權歸PDLIVE所有。</string>
|
||||
<string name="more_integral">更多積分</string>
|
||||
<string name="gift_overvalue">禮物價值超 200%</string>
|
||||
<string name="gift_overvalue3">禮物價值超 300%</string>
|
||||
<string name="unlock_more_gifts">解鎖更多禮物 和全套珍稀裝扮</string>
|
||||
<string name="has_reached_level_after_opening">開通后已達到等級的獎勵將會自動解鎖!</string>
|
||||
<string name="order_level">我的等級</string>
|
||||
<string name="buying_experience_point">購買經驗值:</string>
|
||||
<string name="buying_experience">購買</string>
|
||||
<string name="this_activity_is_over">本期活動已結束,請儘快領取未領取的獎勵積分可保留下次使用</string>
|
||||
<string name="exchange_particulars">兌換詳情</string>
|
||||
<string name="point_exchange">%s(積分) 兌換</string>
|
||||
<string name="point_exchange_number">數量:</string>
|
||||
<string name="more_integral">More points</string>
|
||||
<string name="gift_overvalue">Gifts worth over 200%</string>
|
||||
<string name="gift_overvalue3">Gifts worth over 300%</string>
|
||||
<string name="unlock_more_gifts">More Rare outfits</string>
|
||||
<string name="unlock_more_gifts2">More Collectible outfits</string>
|
||||
<string name="has_reached_level_after_opening">After opened,the rewards that have reached will be automatically unlocked!</string>
|
||||
<string name="order_level">My level</string>
|
||||
<string name="buying_experience_point">Purchase experience value:</string>
|
||||
<string name="buying_experience">Buy</string>
|
||||
<string name="this_activity_is_over">This activity has ended. Please collect the unclaimed rewards as soon as possible.Points can be reserved for future use</string>
|
||||
<string name="exchange_particulars">Exchange Details</string>
|
||||
<string name="point_exchange">%s(points) exchange</string>
|
||||
<string name="point_exchange2">exchange</string>
|
||||
<string name="point_exchange_number">Quantity:</string>
|
||||
|
||||
</resources>
|
||||
|
@ -158,6 +158,7 @@
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".activity.UserAvatarSelectActivity"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity android:name=".activity.BattlePassActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,233 @@
|
||||
package com.yunbao.main.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||
import com.yunbao.common.dialog.ActivateEliteBattleOrderPopupWindow;
|
||||
import com.yunbao.common.dialog.ActivityEndPopupWindow;
|
||||
import com.yunbao.common.dialog.LiberalBattlePassPopupWindow;
|
||||
import com.yunbao.common.dialog.PromotionElitePopupWindow;
|
||||
import com.yunbao.common.dialog.RuleOfWarPopupWindow;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
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.RouteUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.event.BattlePassTypeEvent;
|
||||
import com.yunbao.main.fragment.BattlePassExchangeFragment;
|
||||
import com.yunbao.main.fragment.BattlePassMissionFragment;
|
||||
import com.yunbao.main.fragment.BattlePassRewardFragment;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 战令
|
||||
*/
|
||||
@Route(path = RouteUtil.PATH_BattlePassActivity)
|
||||
public class BattlePassActivity extends AbsActivity {
|
||||
ImageView rule, tab1, tab2, tab3;
|
||||
ViewPager2 viewPager;
|
||||
List<BaseFragment> fragments;
|
||||
TextView sessionView;
|
||||
TextView timeView;
|
||||
TextView levelView;
|
||||
ProgressBar levelProgressView;
|
||||
TextView integralView;
|
||||
Button moreIntegralButton;
|
||||
String enjoySpendMoney = "";
|
||||
String quintessenceSpendMoney = "";
|
||||
|
||||
BattlePassUserInfoBean data;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_battlepass;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main(Bundle savedInstanceState) {
|
||||
super.main(savedInstanceState);
|
||||
Bus.getOn(this);
|
||||
initView();
|
||||
initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
Bus.getOff(this);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
fragments = new ArrayList<>();
|
||||
rule = findViewById(R.id.rule);
|
||||
tab1 = findViewById(R.id.tab_1);
|
||||
tab2 = findViewById(R.id.tab_2);
|
||||
tab3 = findViewById(R.id.tab_3);
|
||||
viewPager = findViewById(R.id.context_layout);
|
||||
fragments.add(new BattlePassRewardFragment());
|
||||
fragments.add(new BattlePassMissionFragment());
|
||||
fragments.add(new BattlePassExchangeFragment());
|
||||
viewPager.setAdapter(new FragmentStateAdapter(this) {
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment createFragment(int position) {
|
||||
return fragments.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return fragments.size();
|
||||
}
|
||||
});
|
||||
viewPager.setUserInputEnabled(false);
|
||||
ViewClicksAntiShake.clicksAntiShake(tab1, () -> clickView(0));
|
||||
ViewClicksAntiShake.clicksAntiShake(tab2, () -> clickView(1));
|
||||
ViewClicksAntiShake.clicksAntiShake(tab3, () -> clickView(2));
|
||||
|
||||
sessionView = findViewById(R.id.session);
|
||||
timeView = findViewById(R.id.time);
|
||||
levelView = findViewById(R.id.level);
|
||||
levelProgressView = findViewById(R.id.level_progress);
|
||||
integralView = findViewById(R.id.integral);
|
||||
moreIntegralButton = findViewById(R.id.more_integral);
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(moreIntegralButton, () -> {
|
||||
if(data.getBattlePassUserRecords3()==2){
|
||||
return;
|
||||
}
|
||||
new XPopup.Builder(mContext)
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight(mContext) - DpUtil.dp2px(34))
|
||||
.asCustom(new PromotionElitePopupWindow(mContext,
|
||||
enjoySpendMoney,
|
||||
quintessenceSpendMoney,
|
||||
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||
@Override
|
||||
public void onCallback(int code, String msg) {
|
||||
System.out.println("code = " + code + ", msg = " + msg);
|
||||
fragments.get(viewPager.getCurrentItem()).updateData();
|
||||
}
|
||||
},
|
||||
String.valueOf(data.getLive_battle_pass_type().get(1).getId()),
|
||||
String.valueOf(data.getLive_battle_pass_type().get(2).getId())
|
||||
))
|
||||
.show();
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(rule, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new XPopup.Builder(BattlePassActivity.this)
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight(BattlePassActivity.this) - DpUtil.dp2px(34))
|
||||
.asCustom(new RuleOfWarPopupWindow(
|
||||
BattlePassActivity.this
|
||||
))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void clickView(int position) {
|
||||
switch (position) {
|
||||
case 0:
|
||||
tab1.setImageResource(R.mipmap.ic_zl_tab1);
|
||||
tab2.setImageResource(R.mipmap.ic_zl_tab2_unselect);
|
||||
tab3.setImageResource(R.mipmap.ic_zl_tab3_unselect);
|
||||
break;
|
||||
case 1:
|
||||
tab1.setImageResource(R.mipmap.ic_zl_tab1_unselect);
|
||||
tab2.setImageResource(R.mipmap.ic_zl_tab2);
|
||||
tab3.setImageResource(R.mipmap.ic_zl_tab3_unselect);
|
||||
break;
|
||||
case 2:
|
||||
tab1.setImageResource(R.mipmap.ic_zl_tab1_unselect);
|
||||
tab2.setImageResource(R.mipmap.ic_zl_tab2_unselect);
|
||||
tab3.setImageResource(R.mipmap.ic_zl_tab3);
|
||||
break;
|
||||
}
|
||||
viewPager.setCurrentItem(position, false);
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void initData() {
|
||||
LiveNetManager.get(mContext)
|
||||
.getBattlePassUserInfo(new HttpCallback<BattlePassUserInfoBean>() {
|
||||
@Override
|
||||
public void onSuccess(BattlePassUserInfoBean data) {
|
||||
BattlePassActivity.this.data = data;
|
||||
sessionView.setText(data.getBattlePassName());
|
||||
timeView.setText(data.getStartTime() + " - " + data.getEndTime());
|
||||
levelView.setText("Lv." + data.getLevel());
|
||||
levelProgressView.setMax(data.getNextLevelExp());
|
||||
levelProgressView.setMin(data.getLastLevelExp());
|
||||
levelProgressView.setProgress(data.getBattlePassExp());
|
||||
integralView.setText(String.format(WordUtil.getNewString(R.string.battlepass_user_my_integral), data.getPoints()));
|
||||
|
||||
for (LiveBattlePassRewardsBean.BattlePassType passType : data.getLive_battle_pass_type()) {
|
||||
if (passType.getId() == 2) {
|
||||
quintessenceSpendMoney = String.valueOf(passType.getDiamond_value());
|
||||
}
|
||||
if (passType.getId() == 3) {
|
||||
enjoySpendMoney = String.valueOf(passType.getDiamond_value());
|
||||
}
|
||||
}
|
||||
if(!data.isBattlePassStatus() && !SpUtil.getInstance().getBooleanValue("is_battle_pass_status")){
|
||||
SpUtil.getInstance().setBooleanValue("is_battle_pass_status",true);//ActivityEndPopupWindow
|
||||
new XPopup.Builder(BattlePassActivity.this)
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight(BattlePassActivity.this) - DpUtil.dp2px(34))
|
||||
.asCustom(new ActivityEndPopupWindow(
|
||||
BattlePassActivity.this
|
||||
))
|
||||
.show();
|
||||
|
||||
}
|
||||
if(data.isBattlePassStatus()){
|
||||
SpUtil.getInstance().removeValue("is_battle_pass_status");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void event(BattlePassTypeEvent event) {
|
||||
if(event.getType()==0){
|
||||
initData();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
package com.yunbao.main.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.BattlePassPoints;
|
||||
import com.yunbao.common.dialog.WarOrderExchangeDetailsPopupWindow;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BattlePassExchangeAdapter extends RecyclerView.Adapter<BattlePassExchangeAdapter.VH> {
|
||||
private Context mContext;
|
||||
List<BattlePassPoints> mList = new ArrayList<>();
|
||||
int point;
|
||||
OnItemClickListener<BattlePassPoints> onItemClickListener;
|
||||
|
||||
public BattlePassExchangeAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
public void setPoint(int point) {
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
public void setList(List<BattlePassPoints> mList) {
|
||||
this.mList = mList;
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener<BattlePassPoints> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public BattlePassExchangeAdapter.VH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new BattlePassExchangeAdapter.VH(LayoutInflater.from(mContext).inflate(R.layout.item_battlepass_exchange, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull BattlePassExchangeAdapter.VH holder, int position) {
|
||||
holder.setData(mList.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mList.size();
|
||||
}
|
||||
|
||||
public class VH extends RecyclerView.ViewHolder {
|
||||
private ImageView icon;
|
||||
private ImageView indicator;
|
||||
private TextView title;
|
||||
private TextView content;
|
||||
private Button submit;
|
||||
private View mark;
|
||||
private TextView markText;
|
||||
|
||||
|
||||
public VH(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
icon = itemView.findViewById(R.id.tab_1);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
content = itemView.findViewById(R.id.content);
|
||||
submit = itemView.findViewById(R.id.submit);
|
||||
indicator = itemView.findViewById(R.id.indicator);
|
||||
mark = itemView.findViewById(R.id.mark_layout);
|
||||
markText = itemView.findViewById(R.id.mark_text);
|
||||
indicator.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
public void setData(BattlePassPoints battlePassPoints) {
|
||||
ImgLoader.display(mContext, battlePassPoints.getImageUrl(), icon);
|
||||
title.setText(battlePassPoints.getRewardsName());
|
||||
content.setText(battlePassPoints.getPointsThresholdText());
|
||||
if (StringUtil.isEmpty(battlePassPoints.getExchangeMark())) {
|
||||
mark.setVisibility(View.GONE);
|
||||
} else {
|
||||
mark.setVisibility(View.VISIBLE);
|
||||
markText.setText(battlePassPoints.getExchangeMark());
|
||||
}
|
||||
if (battlePassPoints.getExchangeStatus() == 1) {
|
||||
submit.setText(WordUtil.getNewString(R.string.battlepass_exchange_submit_lock));
|
||||
submit.setBackgroundResource(R.mipmap.bg_zl_battlepass_exchange_btn_lock);
|
||||
submit.setTextColor(Color.parseColor("#E4E5E8"));
|
||||
return;
|
||||
}
|
||||
if (battlePassPoints.getUserQuintyCount() == battlePassPoints.getExchangeQuantity()) {
|
||||
submit.setTextColor(Color.parseColor("#5773B1"));
|
||||
submit.setText(WordUtil.getNewString(R.string.battlepass_exchange_submit_exchange));
|
||||
submit.setBackgroundResource(R.mipmap.bg_zl_battlepass_exchange_btn_over);
|
||||
} else {
|
||||
submit.setTextColor(Color.parseColor("#FFFFFF"));
|
||||
submit.setText(String.format("%s\n(%s/%s)",
|
||||
WordUtil.getNewString(R.string.battlepass_exchange_submit_unexchange),
|
||||
battlePassPoints.getUserQuintyCount(),
|
||||
battlePassPoints.getExchangeQuantity()
|
||||
));
|
||||
submit.setBackgroundResource(R.mipmap.bg_zl_battlepass_exchange_btn_exchange);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(submit, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new XPopup.Builder(mContext)
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
|
||||
.asCustom(new WarOrderExchangeDetailsPopupWindow(mContext,
|
||||
battlePassPoints.getExchangeQuantity()-battlePassPoints.getUserQuintyCount(),
|
||||
point,
|
||||
Integer.parseInt(battlePassPoints.getPointsThreshold()),
|
||||
battlePassPoints.getImageUrl(),
|
||||
String.valueOf(battlePassPoints.getId()),
|
||||
new WarOrderExchangeDetailsPopupWindow.WarOrderExchangeDetailsCallback() {
|
||||
@Override
|
||||
public void onCallback(int code, String msg) {
|
||||
ToastUtil.show(msg);
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(battlePassPoints, code);
|
||||
}
|
||||
}
|
||||
}
|
||||
))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,203 @@
|
||||
package com.yunbao.main.adapter;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.BattlePassTask;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.dialog.OrderLevelPopupWindow;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BattlePassMissionAdapter extends RecyclerView.Adapter<BattlePassMissionAdapter.VH> {
|
||||
private Context mContext;
|
||||
private List<BattlePassTask.Task> mList = new ArrayList<>();
|
||||
private OnItemClickListener<BattlePassTask.Task> onItemClickListener;
|
||||
|
||||
public BattlePassMissionAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
public void setList(List<BattlePassTask.Task> mList) {
|
||||
this.mList = mList;
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener<BattlePassTask.Task> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
if (mList.get(position).getId() < 0) {
|
||||
return 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public BattlePassMissionAdapter.VH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
if (viewType == 0) {
|
||||
return new BattlePassMissionAdapter.TypeOfTitle(LayoutInflater.from(mContext).inflate(R.layout.item_battlepass_mission_type_title, parent, false));
|
||||
}
|
||||
return new BattlePassMissionAdapter.TypeOfMission(LayoutInflater.from(mContext).inflate(R.layout.item_battlepass_mission_type_mission, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull BattlePassMissionAdapter.VH holder, int position) {
|
||||
holder.setData(mList.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mList.size();
|
||||
}
|
||||
|
||||
public static abstract class VH extends RecyclerView.ViewHolder {
|
||||
protected static final int SUBMIT_BUY = 0;
|
||||
protected static final int SUBMIT_FINISHED = 1;
|
||||
protected static final int SUBMIT_OVER = 2;
|
||||
protected static final int SUBMIT_DEF = 3;
|
||||
|
||||
public VH(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
|
||||
public abstract void setData(BattlePassTask.Task task);
|
||||
}
|
||||
|
||||
private static class TypeOfTitle extends VH {
|
||||
TextView title;
|
||||
|
||||
public TypeOfTitle(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(BattlePassTask.Task task) {
|
||||
if (task.getId() == -1) {
|
||||
title.setText(WordUtil.getNewString(R.string.battlepass_mission_line_title_daily));
|
||||
} else if (task.getId() == -2) {
|
||||
title.setText(WordUtil.getNewString(R.string.battlepass_mission_line_title_season));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TypeOfMission extends VH {
|
||||
ImageView icon;
|
||||
TextView title;
|
||||
TextView content;
|
||||
Button submit;
|
||||
|
||||
|
||||
public TypeOfMission(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
icon = itemView.findViewById(R.id.icon);
|
||||
title = itemView.findViewById(R.id.title);
|
||||
content = itemView.findViewById(R.id.content);
|
||||
submit = itemView.findViewById(R.id.submit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(BattlePassTask.Task task) {
|
||||
/* if (task.getId() == 1) {
|
||||
task.setReceivedTask(1);
|
||||
task.setUserTaskSuccess(1);
|
||||
task.setNotReceivedTask(0);
|
||||
}
|
||||
if (task.getId() == 2) {
|
||||
task.setUserTaskSuccess(2);
|
||||
task.setReceivedTask(5);
|
||||
task.setNotReceivedTask(5);
|
||||
}*/
|
||||
if (task.getTaskSuccess() > 0) {
|
||||
title.setText(String.format("%s(%s/%s)",
|
||||
task.getNameText(),
|
||||
task.getUserTaskSuccess(),
|
||||
task.getTaskSuccess())
|
||||
);
|
||||
} else {
|
||||
title.setText(task.getNameText());
|
||||
}
|
||||
content.setText(task.getRemarkText());
|
||||
ImgLoader.display(itemView.getContext(), task.getImagePath(), icon);
|
||||
submit.setTag(SUBMIT_DEF);
|
||||
submit.setText(WordUtil.getNewString(R.string.battlepass_mission_submit_btn_unfinished));
|
||||
submit.setBackgroundResource(R.drawable.bg_battlepass_mission_btn_unfinished);
|
||||
if (task.isBuy()) {
|
||||
submit.setText(WordUtil.getNewString(R.string.battlepass_mission_submit_btn_buy));
|
||||
submit.setBackgroundResource(R.drawable.bg_battlepass_mission_btn_buy);
|
||||
submit.setTag(SUBMIT_BUY);
|
||||
} else {
|
||||
if (task.getNotReceivedTask() > 0) {
|
||||
submit.setText(WordUtil.getNewString(R.string.battlepass_mission_submit_btn_finished));
|
||||
submit.setBackgroundResource(R.drawable.bg_battlepass_mission_btn_finished);
|
||||
submit.setTag(SUBMIT_FINISHED);
|
||||
}
|
||||
if (task.getNotReceivedTask() == 0 && task.getTaskSuccess() == task.getUserTaskSuccess()) {
|
||||
submit.setText(WordUtil.getNewString(R.string.battlepass_mission_submit_btn_over));
|
||||
submit.setBackgroundResource(R.drawable.bg_battlepass_mission_btn_over);
|
||||
submit.setTag(SUBMIT_OVER);
|
||||
submit.setTextColor(Color.parseColor("#0D21B2"));
|
||||
}
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(submit, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if ((int) submit.getTag() == SUBMIT_FINISHED) {
|
||||
subTask(task);
|
||||
}
|
||||
if ((int) submit.getTag() == SUBMIT_BUY) {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(task, -2);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void subTask(BattlePassTask.Task task) {
|
||||
LiveNetManager.get(itemView.getContext())
|
||||
.getBattlePassTaskOver(String.valueOf(task.getId()), new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
ToastUtil.show(data.getCode() + "|" + data.getMsg());
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(task, data.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemClick(task, -1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,250 @@
|
||||
package com.yunbao.main.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewardAdapter.VH> {
|
||||
private Context mContext;
|
||||
private List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList = new ArrayList<>();
|
||||
private int userLevel;
|
||||
private int userType;
|
||||
private OnItemClickListener<LiveBattlePassRewardsBean.LiveBattlePassReward> onItemClickListener;
|
||||
|
||||
public void setList(List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList) {
|
||||
this.mList = mList;
|
||||
}
|
||||
|
||||
public void setOnItemClickListener(OnItemClickListener<LiveBattlePassRewardsBean.LiveBattlePassReward> onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
public void setUserLevel(int userLevel) {
|
||||
this.userLevel = userLevel;
|
||||
}
|
||||
|
||||
public void setUserType(int userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public BattlePassRewardAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public VH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new VH(LayoutInflater.from(mContext).inflate(R.layout.item_battlepass_reward_type_top, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull VH holder, int position) {
|
||||
holder.setData(mList.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mList.size();
|
||||
}
|
||||
|
||||
public class VH extends RecyclerView.ViewHolder {
|
||||
View lineBg, line, point;
|
||||
View tab1Layout, tab2Layout, tab3Layout;
|
||||
Button lv;
|
||||
ImageView tab1, tab2, tab3;
|
||||
ImageView tab1Unlock, tab2Unlock, tab3Unlock;
|
||||
ImageView tab1Mask, tab2Mask, tab3Mask;
|
||||
ImageView tab1Subscript, tab2Subscript, tab3Subscript;
|
||||
ImageView tab1Received, tab2Received, tab3Received;
|
||||
TextView tab1Title, tab2Title, tab3Title;
|
||||
|
||||
|
||||
Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward> data;
|
||||
|
||||
public VH(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
lineBg = itemView.findViewById(R.id.line_bg);
|
||||
line = itemView.findViewById(R.id.line);
|
||||
point = itemView.findViewById(R.id.point);
|
||||
lv = itemView.findViewById(R.id.reward_lv);
|
||||
tab1Layout = itemView.findViewById(R.id.tab_1_layout);
|
||||
tab2Layout = itemView.findViewById(R.id.tab_2_layout);
|
||||
tab3Layout = itemView.findViewById(R.id.tab_3_layout);
|
||||
tab1 = itemView.findViewById(R.id.tab_1);
|
||||
tab2 = itemView.findViewById(R.id.tab_2);
|
||||
tab3 = itemView.findViewById(R.id.tab_3);
|
||||
tab1Unlock = itemView.findViewById(R.id.tab_1_item_unlock);
|
||||
tab2Unlock = itemView.findViewById(R.id.tab_2_item_unlock);
|
||||
tab3Unlock = itemView.findViewById(R.id.tab_3_item_unlock);
|
||||
tab1Mask = itemView.findViewById(R.id.tab_1_unlock);
|
||||
tab2Mask = itemView.findViewById(R.id.tab_2_unlock);
|
||||
tab3Mask = itemView.findViewById(R.id.tab_3_unlock);
|
||||
tab1Subscript = itemView.findViewById(R.id.tab_1_subscript);
|
||||
tab2Subscript = itemView.findViewById(R.id.tab_2_subscript);
|
||||
tab3Subscript = itemView.findViewById(R.id.tab_3_subscript);
|
||||
tab1Title = itemView.findViewById(R.id.tab_1_title);
|
||||
tab2Title = itemView.findViewById(R.id.tab_2_title);
|
||||
tab3Title = itemView.findViewById(R.id.tab_3_title);
|
||||
tab1Received = itemView.findViewById(R.id.tab_1_item_received);
|
||||
tab2Received = itemView.findViewById(R.id.tab_2_item_received);
|
||||
tab3Received = itemView.findViewById(R.id.tab_3_item_received);
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
public void setData(Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward> data, int position) {
|
||||
this.data = data;
|
||||
if (position == 0) {
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) lineBg.getLayoutParams();
|
||||
ConstraintLayout.LayoutParams params1 = (ConstraintLayout.LayoutParams) line.getLayoutParams();
|
||||
params.topMargin = DpUtil.dp2px(3);
|
||||
params1.topMargin = DpUtil.dp2px(3);
|
||||
}
|
||||
setVisibility(View.VISIBLE, -1, tab1Mask, tab2Mask, tab3Mask);
|
||||
setVisibility(View.GONE, -1, tab1Unlock, tab1Unlock, tab1Unlock);
|
||||
setVisibility(View.GONE, -1, tab1Subscript, tab2Subscript, tab3Subscript);
|
||||
|
||||
line.setVisibility(View.GONE);
|
||||
point.setVisibility(View.GONE);
|
||||
if (userLevel > (position + 1) && userLevel < mList.size()) {
|
||||
setVisibility(View.GONE, -1, tab1Mask, tab2Mask, tab3Mask);
|
||||
point.setVisibility(View.GONE);
|
||||
line.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (userLevel == (position + 1) && userLevel < mList.size()) {
|
||||
setVisibility(View.GONE, -1, tab1Mask, tab2Mask, tab3Mask);
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) line.getLayoutParams();
|
||||
params.bottomMargin = DpUtil.dp2px(70);
|
||||
line.setVisibility(View.VISIBLE);
|
||||
point.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (userLevel >= mList.size()) {
|
||||
setVisibility(View.GONE, -1, tab1Mask, tab2Mask, tab3Mask);
|
||||
line.setVisibility(View.VISIBLE);
|
||||
point.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
lv.setText("V" + (position + 1));
|
||||
getAllView((reward, view) -> ImgLoader.display(mContext, reward.getImageUrl(), view), tab1, tab2, tab3);
|
||||
getAllView(((reward, view) -> {
|
||||
{
|
||||
if (userLevel < (position + 1)) {
|
||||
view.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
if (reward.getLock() == 1) {
|
||||
view.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
view.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}), tab1Unlock, tab2Unlock, tab3Unlock);
|
||||
getAllView(((reward, view) -> {
|
||||
view.setText(reward.getRewardName());
|
||||
}), tab1Title, tab2Title, tab3Title);
|
||||
getAllView(((reward, view) -> {
|
||||
if (reward.getReceived() == 1) {
|
||||
view.setVisibility(View.GONE);
|
||||
} else {
|
||||
view.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}), tab1Received, tab2Received, tab3Received);
|
||||
getAllView(((reward, view) -> {
|
||||
ViewClicksAntiShake.clicksAntiShake(view, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
getReward(reward);
|
||||
}
|
||||
});
|
||||
}), tab1, tab2, tab3);
|
||||
|
||||
}
|
||||
private void getReward(LiveBattlePassRewardsBean.LiveBattlePassReward reward){
|
||||
if(userLevel<reward.getLiveBattlePassLevel()){
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.battlepass_reward_item_lock));
|
||||
return;
|
||||
}
|
||||
if(reward.getLock()==1){
|
||||
//ToastUtil.show("锁了");
|
||||
return;
|
||||
}
|
||||
|
||||
if(userType<reward.getLiveBattlePassTypeId()){
|
||||
ToastUtil.show("没购买");
|
||||
return;
|
||||
}
|
||||
LiveNetManager.get(mContext)
|
||||
.getRewards(String.valueOf(reward.getLiveBattlePassLevel()), String.valueOf(reward.getId()), new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.battlepass_reward_item_get));
|
||||
if(onItemClickListener!=null){
|
||||
onItemClickListener.onItemClick(reward,reward.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
if(onItemClickListener!=null){
|
||||
onItemClickListener.onItemClick(reward,reward.getId());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setVisibility(int visibility, int position, View... views) {
|
||||
if (position == -1) {
|
||||
for (View view : views) {
|
||||
view.setVisibility(visibility);
|
||||
}
|
||||
} else {
|
||||
views[position].setVisibility(visibility);
|
||||
}
|
||||
}
|
||||
|
||||
private <T> void getAllView(ViewData<T> viewData, T... views) {
|
||||
getView(1, viewData, views);
|
||||
getView(2, viewData, views);
|
||||
getView(3, viewData, views);
|
||||
}
|
||||
|
||||
private <T> void getView(int type, ViewData<T> viewData, T... views) {
|
||||
if (data.containsKey(type) && data.get(type) != null && Objects.requireNonNull(data.get(type)).getId() != 0) {
|
||||
viewData.onData(data.get(type), views[type - 1]);
|
||||
} else {
|
||||
setVisibility(View.INVISIBLE, type - 1, tab1Layout, tab2Layout, tab3Layout);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private interface ViewData<T> {
|
||||
void onData(LiveBattlePassRewardsBean.LiveBattlePassReward reward, T view);
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.yunbao.main.event;
|
||||
|
||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BattlePassTypeEvent {
|
||||
int type;
|
||||
|
||||
public BattlePassTypeEvent(int liveBattlePassType) {
|
||||
this.type=liveBattlePassType;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package com.yunbao.main.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.bean.BattlePassPoints;
|
||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||
import com.yunbao.common.custom.ItemDecoration;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.BattlePassActivity;
|
||||
import com.yunbao.main.adapter.BattlePassExchangeAdapter;
|
||||
import com.yunbao.main.adapter.BattlePassMissionAdapter;
|
||||
import com.yunbao.main.event.BattlePassTypeEvent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BattlePassExchangeFragment extends BaseFragment {
|
||||
RecyclerView mRecyclerView;
|
||||
BattlePassExchangeAdapter adapter;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container) {
|
||||
return inflater.inflate(R.layout.fragment_battlepass_exchange, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
updateData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateData() {
|
||||
super.updateData();
|
||||
loadData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
mRecyclerView = findViewById(R.id.recycler_view);
|
||||
adapter = new BattlePassExchangeAdapter(getContext());
|
||||
adapter.setOnItemClickListener(new OnItemClickListener<BattlePassPoints>() {
|
||||
@Override
|
||||
public void onItemClick(BattlePassPoints bean, int position) {
|
||||
updateData();
|
||||
Bus.get().post(new BattlePassTypeEvent(0));
|
||||
}
|
||||
});
|
||||
mRecyclerView.setAdapter(adapter);
|
||||
}
|
||||
private void initData() {
|
||||
LiveNetManager.get(getContext())
|
||||
.getBattlePassUserInfo(new HttpCallback<BattlePassUserInfoBean>() {
|
||||
@Override
|
||||
public void onSuccess(BattlePassUserInfoBean data) {
|
||||
if(adapter!=null) {
|
||||
adapter.setPoint(data.getPoints());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
protected void loadData() {
|
||||
initData();
|
||||
LiveNetManager.get(getContext())
|
||||
.getBattlePassPoints(new HttpCallback<List<BattlePassPoints>>() {
|
||||
@Override
|
||||
public void onSuccess(List<BattlePassPoints> data) {
|
||||
adapter.setList(data);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,136 @@
|
||||
package com.yunbao.main.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.BattlePassTask;
|
||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.custom.ItemDecoration;
|
||||
import com.yunbao.common.dialog.OrderLevelPopupWindow;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.BattlePassMissionAdapter;
|
||||
import com.yunbao.main.event.BattlePassTypeEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BattlePassMissionFragment extends BaseFragment {
|
||||
RecyclerView mRecyclerView;
|
||||
BattlePassMissionAdapter adapter;
|
||||
BattlePassUserInfoBean userInfoBean;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container) {
|
||||
return inflater.inflate(R.layout.fragment_battlepass_mission, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
updateData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateData() {
|
||||
super.updateData();
|
||||
loadData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
mRecyclerView = findViewById(R.id.recycler_view);
|
||||
adapter = new BattlePassMissionAdapter(getContext());
|
||||
ItemDecoration decoration = new ItemDecoration(getContext(), 0x00000000, 1, DpUtil.dp2px(10));
|
||||
decoration.setOnlySetItemOffsetsButNoDraw(true);
|
||||
//mRecyclerView.addItemDecoration(decoration);
|
||||
adapter.setOnItemClickListener(new OnItemClickListener<BattlePassTask.Task>() {
|
||||
@Override
|
||||
public void onItemClick(BattlePassTask.Task bean, int position) {
|
||||
if (position == -2) {
|
||||
if (userInfoBean.getNextLevelExp() == 0) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.battlepass_user_level_max));
|
||||
return;
|
||||
}
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) getContext()) - DpUtil.dp2px(34))
|
||||
.asCustom(new OrderLevelPopupWindow(getContext(),
|
||||
userInfoBean.getBattlePassExp() - userInfoBean.getLastLevelExp(),
|
||||
userInfoBean.getNextLevelExp() - userInfoBean.getLastLevelExp(),
|
||||
String.valueOf(userInfoBean.getLevel()),
|
||||
String.valueOf(IMLoginManager.get(getContext()).getUserInfo().getCoin()),
|
||||
new OrderLevelPopupWindow.OrderLevelCallback() {
|
||||
@Override
|
||||
public void onCallback(int code, String msg) {
|
||||
ToastUtil.show(msg);
|
||||
Bus.get().post(new BattlePassTypeEvent(0));
|
||||
updateData();
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
.show();
|
||||
} else {
|
||||
loadData();
|
||||
}
|
||||
}
|
||||
});
|
||||
mRecyclerView.setAdapter(adapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
LiveNetManager.get(getContext())
|
||||
.getBattlePassTask(new HttpCallback<BattlePassTask>() {
|
||||
@Override
|
||||
public void onSuccess(BattlePassTask data) {
|
||||
List<BattlePassTask.Task> tasks = new ArrayList<>();
|
||||
tasks.add(new BattlePassTask.Task(-1));
|
||||
tasks.addAll(data.getDaily());
|
||||
tasks.add(new BattlePassTask.Task(-2));
|
||||
tasks.addAll(data.getSeason());
|
||||
adapter.setList(tasks);
|
||||
adapter.notifyDataSetChanged();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
LiveNetManager.get(getContext())
|
||||
.getBattlePassUserInfo(new HttpCallback<BattlePassUserInfoBean>() {
|
||||
@Override
|
||||
public void onSuccess(BattlePassUserInfoBean data) {
|
||||
userInfoBean = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,196 @@
|
||||
package com.yunbao.main.fragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||
import com.yunbao.common.dialog.ActivateEliteBattleOrderPopupWindow;
|
||||
import com.yunbao.common.dialog.LiberalBattlePassPopupWindow;
|
||||
import com.yunbao.common.fragment.BaseFragment;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.BattlePassRewardAdapter;
|
||||
import com.yunbao.main.event.BattlePassTypeEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
public class BattlePassRewardFragment extends BaseFragment {
|
||||
ImageView tab1;
|
||||
ImageView tab2;
|
||||
ImageView tab3;
|
||||
RecyclerView recyclerView;
|
||||
|
||||
BattlePassRewardAdapter adapter;
|
||||
String enjoySpendMoney = "";
|
||||
String quintessenceSpendMoney = "";
|
||||
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container) {
|
||||
return inflater.inflate(R.layout.fragment_battlepass_reward, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initVariables(Bundle bundle) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
updateData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateData() {
|
||||
super.updateData();
|
||||
loadData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews(Bundle savedInstanceState, View contentView) {
|
||||
tab1 = findViewById(R.id.tab_1);
|
||||
tab2 = findViewById(R.id.tab_2);
|
||||
tab3 = findViewById(R.id.tab_3);
|
||||
recyclerView = findViewById(R.id.recycler_view);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
adapter = new BattlePassRewardAdapter(getContext());
|
||||
adapter.setOnItemClickListener(new OnItemClickListener<LiveBattlePassRewardsBean.LiveBattlePassReward>() {
|
||||
@Override
|
||||
public void onItemClick(LiveBattlePassRewardsBean.LiveBattlePassReward bean, int position) {
|
||||
loadData();
|
||||
Bus.get().post(new BattlePassTypeEvent(0));
|
||||
}
|
||||
});
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(tab2, () -> {
|
||||
if(tab2.getTag()!=null){
|
||||
return;
|
||||
}
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) getContext()) - DpUtil.dp2px(34))
|
||||
.asCustom(new ActivateEliteBattleOrderPopupWindow(
|
||||
getContext(),
|
||||
quintessenceSpendMoney,
|
||||
true,
|
||||
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||
@Override
|
||||
public void onCallback(int code, String msg) {
|
||||
ToastUtil.show(msg);
|
||||
loadData();
|
||||
Bus.get().post(new BattlePassTypeEvent(0));
|
||||
}
|
||||
},
|
||||
"2"
|
||||
))
|
||||
.show();
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(tab3, () -> {
|
||||
if(tab3.getTag()!=null){
|
||||
return;
|
||||
}
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) getContext()) - DpUtil.dp2px(34))
|
||||
.asCustom(new ActivateEliteBattleOrderPopupWindow(getContext(),
|
||||
enjoySpendMoney,
|
||||
false,
|
||||
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||
@Override
|
||||
public void onCallback(int code, String msg) {
|
||||
loadData();
|
||||
Bus.get().post(new BattlePassTypeEvent(0));
|
||||
}
|
||||
},
|
||||
"3"
|
||||
))
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadData() {
|
||||
LiveNetManager.get(getContext())
|
||||
.getLiveBattlePassRewards(new HttpCallback<LiveBattlePassRewardsBean>() {
|
||||
@Override
|
||||
public void onSuccess(LiveBattlePassRewardsBean data) {
|
||||
|
||||
int level = data.getLevel();
|
||||
int type = 1;
|
||||
for (LiveBattlePassRewardsBean.BattlePassType passType : data.getLive_battle_pass_type()) {
|
||||
if (passType.getId() == 2) {
|
||||
quintessenceSpendMoney = String.valueOf(passType.getDiamond_value());
|
||||
}
|
||||
if (passType.getId() == 3) {
|
||||
enjoySpendMoney = String.valueOf(passType.getDiamond_value());
|
||||
}
|
||||
if (passType.getLock() == 2) {
|
||||
type = passType.getId();
|
||||
}
|
||||
}
|
||||
Collection<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> values = data.getLive_battle_pass_rewards().values();
|
||||
List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> list = new ArrayList<>(values);
|
||||
/* list.get(1).get(1).setReceived(2);
|
||||
list.get(0).get(2).setLock(2);
|
||||
list.get(1).get(2).setLock(2);
|
||||
type = 1;
|
||||
level = 3;*/
|
||||
setTab(type);
|
||||
adapter.setUserLevel(level);
|
||||
adapter.setUserType(type);
|
||||
adapter.setList(list);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setTab(int type) {
|
||||
if (type == 1) {
|
||||
tab1.setTag(true);
|
||||
tab1.setImageResource(R.mipmap.ic_reward_tab_normal);
|
||||
tab2.setImageResource(R.mipmap.ic_reward_tab_upgrade_unselect);
|
||||
tab3.setImageResource(R.mipmap.ic_reward_tab_ultimate_unselect);
|
||||
} else if (type == 2) {
|
||||
tab1.setTag(true);
|
||||
tab2.setTag(true);
|
||||
tab1.setImageResource(R.mipmap.ic_reward_tab_normal);
|
||||
tab2.setImageResource(R.mipmap.ic_reward_tab_upgrade);
|
||||
tab3.setImageResource(R.mipmap.ic_reward_tab_ultimate_unselect);
|
||||
} else {
|
||||
tab1.setTag(true);
|
||||
tab2.setTag(true);
|
||||
tab3.setTag(true);
|
||||
tab1.setImageResource(R.mipmap.ic_reward_tab_normal);
|
||||
tab2.setImageResource(R.mipmap.ic_reward_tab_upgrade);
|
||||
tab3.setImageResource(R.mipmap.ic_reward_tab_ultimate);
|
||||
}
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@ package com.yunbao.main.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
@ -9,6 +10,7 @@ import android.widget.ImageView;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
/**
|
||||
@ -41,6 +43,14 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
|
||||
|
||||
ImgLoader.display(mContext, "https://downs.yaoulive.com/gif_trophy.gif", img_trophy);
|
||||
|
||||
img_trophy.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View view) {
|
||||
RouteUtil.forwardBattlePass();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void setCurPosition(int position) {
|
||||
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="65dp" android:height="30dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#EF8311" android:endColor="#FFCE47" android:angle="90" />
|
||||
<corners android:topLeftRadius="15dp" android:topRightRadius="15dp" android:bottomLeftRadius="15dp" android:bottomRightRadius="15dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="65dp" android:height="30dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#B94FFF" android:endColor="#ffeba7ff" android:angle="90" />
|
||||
<corners android:topLeftRadius="15dp" android:topRightRadius="15dp" android:bottomLeftRadius="15dp" android:bottomRightRadius="15dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="65dp" android:height="30dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#D7D2FC" android:endColor="#C9D7FE" android:angle="90" />
|
||||
<corners android:topLeftRadius="15dp" android:topRightRadius="15dp" android:bottomLeftRadius="15dp" android:bottomRightRadius="15dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="65dp" android:height="30dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#9935FF" android:endColor="#ffeba7ff" android:angle="90" />
|
||||
<corners android:topLeftRadius="15dp" android:topRightRadius="15dp" android:bottomLeftRadius="15dp" android:bottomRightRadius="15dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="315dp" android:height="71dp">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:type="linear" android:useLevel="true" android:startColor="#ff6378ff" android:endColor="#ff6e53ff" android:angle="180" />
|
||||
<corners android:topLeftRadius="6dp" android:topRightRadius="6dp" android:bottomLeftRadius="6dp" android:bottomRightRadius="6dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item >
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFF" />
|
||||
<corners android:radius="270dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
15
main/src/main/res/drawable/bg_text_battlepass_reward_lv.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="27dp" android:height="16dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFECA9" />
|
||||
<corners android:topLeftRadius="8dp" android:topRightRadius="8dp" android:bottomLeftRadius="8dp" android:bottomRightRadius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:top="0.3dp" android:bottom="0.3dp" android:left="0.3dp" android:right="0.3dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#ff342524" />
|
||||
<corners android:topLeftRadius="10dp" android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item >
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFFCEA" />
|
||||
<corners android:radius="270dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:left="1.9dp"
|
||||
android:right="1.9dp"
|
||||
android:top="1.9dp"
|
||||
android:bottom="1.9dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFD89F" />
|
||||
<corners android:radius="270dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
23
main/src/main/res/drawable/bg_zl_user_level_progres.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--设置ProgressBar背景色-->
|
||||
<item android:id="@android:id/background">
|
||||
<shape>
|
||||
<!--设置ProgressBar进度条圆角半径-->
|
||||
<corners android:radius="3dp" />
|
||||
<solid android:color="#DFD5FC" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!--设置ProgressBar进度条颜色-->
|
||||
<item android:id="@android:id/progress">
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape>
|
||||
<corners android:radius="3dp" />
|
||||
<gradient
|
||||
android:endColor="#fff"
|
||||
android:startColor="#fff" />
|
||||
</shape>
|
||||
</scale>
|
||||
</item>
|
||||
</layer-list>
|
21
main/src/main/res/drawable/bg_zl_vp.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/background_order_dialog_out_layout">
|
||||
<shape android:shape="oval" >
|
||||
<corners android:radius="20dp" />
|
||||
<solid android:color="#CCBEF3" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:bottom="8dp" android:top="8dp" android:left="8dp" android:right="8dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="25dp" />
|
||||
<solid android:color="#6781E6" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:bottom="15dp" android:top="15dp" android:left="15dp" android:right="15dp">
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="20dp" />
|
||||
<solid android:color="#fff" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
95
main/src/main/res/layout/activity_battlepass.xml
Normal file
@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:background="#140F1F"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView9"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/bg_zl"
|
||||
android:scaleType="fitStart"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.56">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_back"
|
||||
android:onClick="backClick"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/rule"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_rule"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_height="35dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1"
|
||||
android:layout_width="100dp"
|
||||
android:layout_marginEnd="9.5dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_tab1" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_2"
|
||||
android:layout_marginEnd="9.5dp"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_tab2_unselect" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_tab3_unselect" />
|
||||
</LinearLayout>
|
||||
<include
|
||||
layout="@layout/view_battlepass_user"
|
||||
android:layout_marginTop="32dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:layout_marginTop="26dp"
|
||||
android:id="@+id/context_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/background_order_dialog"
|
||||
android:layout_height="match_parent" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -21,7 +21,6 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/color_b14066"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ProgressBar
|
||||
@ -33,7 +32,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rootView"
|
||||
android:background="@drawable/backgroud_custom_drawer_popup"
|
||||
android:background="#FFF"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" />
|
||||
|
25
main/src/main/res/layout/fragment_battlepass_exchange.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="22dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:spanCount="3"
|
||||
tools:listitem="@layout/item_battlepass_exchange" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
22
main/src/main/res/layout/fragment_battlepass_mission.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginBottom="22dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_battlepass_mission_type_mission"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
46
main/src/main/res/layout/fragment_battlepass_reward.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginStart="45dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/ic_reward_tab_normal" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_2"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/ic_reward_tab_upgrade_unselect" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3"
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/ic_reward_tab_ultimate_unselect" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_weight="1"
|
||||
tools:listitem="@layout/item_battlepass_reward_type_top" />
|
||||
</LinearLayout>
|
109
main/src/main/res/layout/item_battlepass_exchange.xml
Normal file
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="95dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/tab_1_layout"
|
||||
android:layout_width="73dp"
|
||||
android:layout_height="75dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@mipmap/bg_zl_battlepass_reward_item"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/ic_integral"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/mark_layout"
|
||||
android:layout_width="66dp"
|
||||
android:layout_height="23.5dp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab_1"
|
||||
android:background="@mipmap/bg_battlepass_reward_item_mark"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mark_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="9sp"
|
||||
android:gravity="center"
|
||||
tools:text="戰令5級解鎖\n123" />
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:id="@+id/indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="彩鑽之翼(92天)"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="1"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tab_1_layout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/battlepass_integral"
|
||||
android:textColor="#CE2BFF"
|
||||
android:textSize="13sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:background="@mipmap/bg_zl_battlepass_exchange_btn_exchange"
|
||||
android:text="兌換\n(0/10)"
|
||||
android:textColor="#FFF"
|
||||
app:autoSizeMaxTextSize="13sp"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/content" />
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@drawable/bg_battlepass_mission_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_height="80dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="49dp"
|
||||
android:layout_height="49dp"
|
||||
android:layout_marginStart="13dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/icon_live_record_play" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:text="每日簽到(0/1)"
|
||||
android:textColor="#F2F9FF"
|
||||
android:textStyle="bold"
|
||||
app:autoSizeMaxTextSize="14sp"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintEnd_toStartOf="@+id/submit"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textColor="#F2F9FF"
|
||||
android:textSize="12sp"
|
||||
android:text="獎勵100經驗值/次"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="@string/battlepass_mission_submit_btn_unfinished"
|
||||
android:textColor="#FFFFFF"
|
||||
android:background="@drawable/bg_battlepass_mission_btn_unfinished"
|
||||
android:textSize="14sp"
|
||||
android:stateListAnimator="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/battlepass_mission_line_title_daily"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
274
main/src/main/res/layout/item_battlepass_reward_type_top.xml
Normal file
@ -0,0 +1,274 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="130dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/line_bg"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#8D8E9C"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/reward_lv"
|
||||
app:layout_constraintStart_toStartOf="@+id/reward_lv"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FFAC5D"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/line_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/line_bg"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/reward_lv"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:background="@drawable/bg_text_battlepass_reward_lv"
|
||||
android:text="v1"
|
||||
android:textColor="#FFECA9"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/point"
|
||||
android:layout_width="7dp"
|
||||
android:layout_height="7dp"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:background="@drawable/bg_text_battlepass_reward_point"
|
||||
app:layout_constraintEnd_toEndOf="@+id/reward_lv"
|
||||
app:layout_constraintStart_toStartOf="@+id/reward_lv"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toEndOf="@+id/reward_lv"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/tab_1_layout"
|
||||
android:layout_width="73dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/bg_zl_battlepass_reward_item"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_integral"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_1_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1_unlock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/bg_zl_battlepass_reward_item_unlock"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_1_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_1_item_unlock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_1_bg" />
|
||||
<ImageView
|
||||
android:id="@+id/tab_1_item_received"
|
||||
android:layout_width="49.5dp"
|
||||
android:layout_height="17dp"
|
||||
android:src="@mipmap/ic_zl_battlepass_reward_item_received"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_1_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_1_bg" />
|
||||
<ImageView
|
||||
android:id="@+id/tab_1_subscript"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab_1_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="甜蜜氣球\n&積分30"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/tab_2_layout"
|
||||
android:layout_width="73dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_2_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/bg_zl_battlepass_reward_item"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_integral"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_2_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_2_unlock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_2_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_2_item_unlock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_2_bg" />
|
||||
<ImageView
|
||||
android:id="@+id/tab_2_item_received"
|
||||
android:layout_width="49.5dp"
|
||||
android:layout_height="17dp"
|
||||
android:src="@mipmap/ic_zl_battlepass_reward_item_received"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_2_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_2_bg" />
|
||||
<ImageView
|
||||
android:id="@+id/tab_2_subscript"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_battlpas_exchange_subscript2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/tab_2_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="甜蜜氣球\n&積分30"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tab_2_bg" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/tab_3_layout"
|
||||
android:layout_width="73dp"
|
||||
android:layout_height="wrap_content">
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/bg_zl_battlepass_reward_item"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<ImageView
|
||||
android:id="@+id/tab_3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_integral"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tab_3_bg" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_unlock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@mipmap/bg_zl_battlepass_reward_item_unlock"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_item_unlock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_battlepass_reward_item_unlock"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_3_bg" />
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_item_received"
|
||||
android:layout_width="49.5dp"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:src="@mipmap/ic_zl_battlepass_reward_item_received"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tab_3_bg"
|
||||
app:layout_constraintEnd_toEndOf="@id/tab_3_bg" />
|
||||
<ImageView
|
||||
android:id="@+id/tab_3_subscript"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_zl_battlpas_exchange_subscript"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/tab_3_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="甜蜜氣球\n&積分30"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tab_3_bg" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
114
main/src/main/res/layout/view_battlepass_user.xml
Normal file
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="210dp">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:background="@mipmap/bg_zl_user_top"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/session"
|
||||
android:text="@string/battlepass_user_session"
|
||||
android:textColor="#40227D"
|
||||
android:textSize="20sp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="17dp"
|
||||
android:layout_gravity="end"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<ImageView
|
||||
android:id="@+id/imageView10"
|
||||
android:layout_marginStart="15.5dp"
|
||||
android:layout_width="101dp"
|
||||
android:layout_height="19dp"
|
||||
android:src="@mipmap/zl_user_pass" />
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_marginTop="11.5dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="@string/battlepass_user_time"
|
||||
android:textColor="#442787"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<TextView
|
||||
android:id="@+id/userLevel"
|
||||
android:layout_marginTop="11.5dp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="15dp"
|
||||
android:text="@string/battlepass_user_level"
|
||||
android:textColor="#442787"
|
||||
android:textSize="14sp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/level"
|
||||
android:textStyle="bold"
|
||||
android:text="Lv.1"
|
||||
android:textColor="#442787"
|
||||
android:textSize="14sp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/level_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="7dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
android:progressDrawable="@drawable/bg_zl_user_level_progres" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_marginTop="-60dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@mipmap/bg_zl_user_bottom"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/integral"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/battlepass_user_my_integral"
|
||||
android:textColor="#442787"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<ImageView
|
||||
android:src="@mipmap/ic_integral"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/more_integral"
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="@mipmap/bg_zl_user_button"
|
||||
android:text="@string/battlepass_user_more_integral"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
BIN
main/src/main/res/mipmap-b+en+us/ic_reward_tab_normal.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
main/src/main/res/mipmap-b+en+us/ic_reward_tab_ultimate.png
Normal file
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 13 KiB |
BIN
main/src/main/res/mipmap-b+en+us/ic_reward_tab_upgrade.png
Normal file
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 6.5 KiB |
BIN
main/src/main/res/mipmap-b+en+us/ic_zl_tab1.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
main/src/main/res/mipmap-b+en+us/ic_zl_tab1_unselect.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
main/src/main/res/mipmap-b+en+us/ic_zl_tab2.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
main/src/main/res/mipmap-b+en+us/ic_zl_tab2_unselect.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
main/src/main/res/mipmap-b+en+us/ic_zl_tab3.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
main/src/main/res/mipmap-b+en+us/ic_zl_tab3_unselect.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
main/src/main/res/mipmap-b+en+us/zl_user_pass.png
Normal file
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 719 B |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 49 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/bg_zl_battlepass_reward_item.png
Normal file
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 3.9 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/bg_zl_user_bottom.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/bg_zl_user_button.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/bg_zl_user_top.png
Normal file
After Width: | Height: | Size: 330 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_reward_tab_normal.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_reward_tab_ultimate.png
Normal file
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 12 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_reward_tab_upgrade.png
Normal file
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 15 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_zl_back.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 6.0 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_zl_rule.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_zl_tab1.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_zl_tab1_unselect.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_zl_tab2.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_zl_tab2_unselect.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_zl_tab3.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/ic_zl_tab3_unselect.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
main/src/main/res/mipmap-xxhdpi/zl_user_pass.png
Normal file
After Width: | Height: | Size: 30 KiB |