修复测试反馈问题
This commit is contained in:
parent
924afce81e
commit
34986d6897
@ -166,21 +166,21 @@ android {
|
||||
}
|
||||
}
|
||||
variant.outputs.all {
|
||||
def isGoogle = "link"
|
||||
def isGoogle = "链接"
|
||||
if (rootProject.ext.manifestPlaceholders.isGooglePlay == 1) {
|
||||
isGoogle = "Google"
|
||||
isGoogle = "谷歌"
|
||||
} else if (rootProject.ext.manifestPlaceholders.isGooglePlay == 2) {
|
||||
isGoogle = "Huawei"
|
||||
}
|
||||
def isPlugin = "all"
|
||||
def isPlugin = "完整"
|
||||
if (rootProject.ext.manifestPlaceholders.isPluginModel) {
|
||||
isPlugin = "plugin"
|
||||
isPlugin = "插件"
|
||||
}
|
||||
def isTest = "测试服"
|
||||
if (rootProject.ext.manifestPlaceholders.serverHost == "https://napi.yaoulive.com") {
|
||||
isTest = "正式服"
|
||||
}
|
||||
outputFileName = "[${new Date().format("yyyy-MM-dd HHmmss", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
|
||||
outputFileName = "[${new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("GMT+8"))}]PDLive-${defaultConfig.versionName}-${isGoogle}-${isPlugin}-${variant.buildType.name}-${isTest}.apk"
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -49,14 +49,14 @@ public class ActivateEliteBattleOrderPopupWindow extends CenterPopupView {
|
||||
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));
|
||||
((TextView)findViewById(R.id.gift3_text)).setText(WordUtil.getNewString(R.string.unlock_more_gifts));
|
||||
} 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));
|
||||
((TextView)findViewById(R.id.gift3_text)).setText(WordUtil.getNewString(R.string.unlock_more_gifts2));
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.war_order_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -25,6 +26,12 @@ public class RuleOfWarPopupWindow extends CenterPopupView {
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
rule=findViewById(R.id.rule);
|
||||
findViewById(R.id.close).setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
initData();
|
||||
}
|
||||
private void initData(){
|
||||
@ -32,7 +39,7 @@ public class RuleOfWarPopupWindow extends CenterPopupView {
|
||||
.getBattlePassRule(new HttpCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
rule.setText(data);
|
||||
rule.setText(data.replace("\n","\n\n"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,6 +13,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
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.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
@ -89,6 +90,10 @@ public class WarOrderExchangeDetailsPopupWindow extends CenterPopupView {
|
||||
orderLevel.setText(buyExp);
|
||||
BigDecimal needExpBigDecimal = buyExpBigDecimal.multiply(new BigDecimal(mScale));
|
||||
pointExchange.setText(String.format("%s",needExpBigDecimal));
|
||||
}else if(exp >= mLimitQuantity){
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.battlepass_exchange_buy_max));
|
||||
}else {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.battlepass_exchange_buy_integral));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -54,8 +54,10 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center">
|
||||
@ -83,10 +85,10 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:gravity="center"
|
||||
android:inputType="number"
|
||||
android:imeOptions="actionSend"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionSend"
|
||||
android:inputType="number"
|
||||
android:singleLine="true"
|
||||
android:text="0"
|
||||
android:textColor="#000000"
|
||||
|
@ -14,8 +14,8 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="111dp"
|
||||
android:layout_height="62.5dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
@ -45,6 +46,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center"
|
||||
|
@ -1412,11 +1412,13 @@ Limited ride And limited avatar frame</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_point">Purchase EXP 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>
|
||||
<string name="battlepass_exchange_buy_integral">Insufficient points</string>
|
||||
<string name="battlepass_exchange_buy_max">The quantity of goods exchanged has reached the upper limit</string>
|
||||
</resources>
|
||||
|
@ -1415,4 +1415,6 @@
|
||||
<string name="point_exchange">%s(積分) 兌換</string>
|
||||
<string name="point_exchange2">兌換</string>
|
||||
<string name="point_exchange_number">數量:</string>
|
||||
<string name="battlepass_exchange_buy_integral">積分不足</string>
|
||||
<string name="battlepass_exchange_buy_max">商品兌換數量已達到上限</string>
|
||||
</resources>
|
||||
|
@ -1414,4 +1414,6 @@
|
||||
<string name="point_exchange">%s(積分) 兌換</string>
|
||||
<string name="point_exchange2">兌換</string>
|
||||
<string name="point_exchange_number">數量:</string>
|
||||
<string name="battlepass_exchange_buy_integral">積分不足</string>
|
||||
<string name="battlepass_exchange_buy_max">商品兌換數量已達到上限</string>
|
||||
</resources>
|
||||
|
@ -1414,4 +1414,6 @@
|
||||
<string name="point_exchange">%s(積分) 兌換</string>
|
||||
<string name="point_exchange2">兌換</string>
|
||||
<string name="point_exchange_number">數量:</string>
|
||||
<string name="battlepass_exchange_buy_integral">積分不足</string>
|
||||
<string name="battlepass_exchange_buy_max">商品兌換數量已達到上限</string>
|
||||
</resources>
|
||||
|
@ -1413,12 +1413,14 @@ Limited ride And limited avatar frame</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_point">Purchase EXP 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>
|
||||
<string name="battlepass_exchange_buy_integral">Insufficient points</string>
|
||||
<string name="battlepass_exchange_buy_max">The quantity of goods exchanged has reached the upper limit</string>
|
||||
|
||||
</resources>
|
||||
|
@ -59,6 +59,7 @@ public class BattlePassActivity extends AbsActivity {
|
||||
TextView sessionView;
|
||||
TextView timeView;
|
||||
TextView levelView;
|
||||
TextView expText;
|
||||
ProgressBar levelProgressView;
|
||||
TextView integralView;
|
||||
Button moreIntegralButton;
|
||||
@ -92,6 +93,7 @@ public class BattlePassActivity extends AbsActivity {
|
||||
tab1 = findViewById(R.id.tab_1);
|
||||
tab2 = findViewById(R.id.tab_2);
|
||||
tab3 = findViewById(R.id.tab_3);
|
||||
expText = findViewById(R.id.exp_text);
|
||||
viewPager = findViewById(R.id.context_layout);
|
||||
fragments.add(new BattlePassRewardFragment());
|
||||
fragments.add(new BattlePassMissionFragment());
|
||||
@ -121,7 +123,8 @@ public class BattlePassActivity extends AbsActivity {
|
||||
moreIntegralButton = findViewById(R.id.more_integral);
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(moreIntegralButton, () -> {
|
||||
if(data.getBattlePassUserRecords3()==2){
|
||||
if (data.getBattlePassUserRecords3() == 2) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.battlepass_buy_max));
|
||||
return;
|
||||
}
|
||||
new XPopup.Builder(mContext)
|
||||
@ -133,7 +136,7 @@ public class BattlePassActivity extends AbsActivity {
|
||||
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||
@Override
|
||||
public void onCallback(int code, String msg) {
|
||||
System.out.println("code = " + code + ", msg = " + msg);
|
||||
ToastUtil.show(msg);
|
||||
fragments.get(viewPager.getCurrentItem()).updateData();
|
||||
}
|
||||
},
|
||||
@ -185,8 +188,13 @@ public class BattlePassActivity extends AbsActivity {
|
||||
public void onSuccess(BattlePassUserInfoBean data) {
|
||||
BattlePassActivity.this.data = data;
|
||||
sessionView.setText(data.getBattlePassName());
|
||||
timeView.setText(data.getStartTime() + " - " + data.getEndTime());
|
||||
timeView.setText(String.format("%s %s - %s",
|
||||
WordUtil.getNewString(R.string.battlepass_user_time),
|
||||
data.getStartTime(),
|
||||
data.getEndTime()
|
||||
));
|
||||
levelView.setText("Lv." + data.getLevel());
|
||||
expText.setText(data.getBattlePassExp() + "/" + data.getNextLevelExp());
|
||||
levelProgressView.setMax(data.getNextLevelExp());
|
||||
levelProgressView.setMin(data.getLastLevelExp());
|
||||
levelProgressView.setProgress(data.getBattlePassExp());
|
||||
@ -200,8 +208,8 @@ public class BattlePassActivity extends AbsActivity {
|
||||
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
|
||||
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))
|
||||
@ -211,7 +219,7 @@ public class BattlePassActivity extends AbsActivity {
|
||||
.show();
|
||||
|
||||
}
|
||||
if(data.isBattlePassStatus()){
|
||||
if (data.isBattlePassStatus()) {
|
||||
SpUtil.getInstance().removeValue("is_battle_pass_status");
|
||||
}
|
||||
|
||||
@ -226,7 +234,7 @@ public class BattlePassActivity extends AbsActivity {
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void event(BattlePassTypeEvent event) {
|
||||
if(event.getType()==0){
|
||||
if (event.getType() == 0) {
|
||||
initData();
|
||||
}
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ public class BattlePassExchangeAdapter extends RecyclerView.Adapter<BattlePassEx
|
||||
mark.setVisibility(View.VISIBLE);
|
||||
markText.setText(battlePassPoints.getExchangeMark());
|
||||
}
|
||||
submit.setOnClickListener(null);
|
||||
if (battlePassPoints.getExchangeStatus() == 1) {
|
||||
submit.setText(WordUtil.getNewString(R.string.battlepass_exchange_submit_lock));
|
||||
submit.setBackgroundResource(R.mipmap.bg_zl_battlepass_exchange_btn_lock);
|
||||
@ -109,6 +110,7 @@ public class BattlePassExchangeAdapter extends RecyclerView.Adapter<BattlePassEx
|
||||
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);
|
||||
return;
|
||||
} else {
|
||||
submit.setTextColor(Color.parseColor("#FFFFFF"));
|
||||
submit.setText(String.format("%s\n(%s/%s)",
|
||||
|
@ -7,13 +7,13 @@ 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.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@ -35,7 +35,7 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
private Context mContext;
|
||||
private List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList = new ArrayList<>();
|
||||
private int userLevel;
|
||||
private int userType;
|
||||
private BattlePassUserInfoBean userType;
|
||||
private OnItemClickListener<LiveBattlePassRewardsBean.LiveBattlePassReward> onItemClickListener;
|
||||
|
||||
public void setList(List<Map<Integer, LiveBattlePassRewardsBean.LiveBattlePassReward>> mList) {
|
||||
@ -50,7 +50,7 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
this.userLevel = userLevel;
|
||||
}
|
||||
|
||||
public void setUserType(int userType) {
|
||||
public void setUserType(BattlePassUserInfoBean userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
@ -153,7 +153,6 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
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;
|
||||
@ -163,7 +162,6 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
} else {
|
||||
view.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}), tab1Unlock, tab2Unlock, tab3Unlock);
|
||||
getAllView(((reward, view) -> {
|
||||
view.setText(reward.getRewardName());
|
||||
@ -194,11 +192,27 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter<BattlePassRewa
|
||||
//ToastUtil.show("锁了");
|
||||
return;
|
||||
}
|
||||
|
||||
if(userType<reward.getLiveBattlePassTypeId()){
|
||||
switch (reward.getLiveBattlePassTypeId()){
|
||||
case 1:
|
||||
if(userType.getBattlePassUserRecords1()==1){
|
||||
ToastUtil.show("没购买");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if(userType.getBattlePassUserRecords2()==1){
|
||||
ToastUtil.show("没购买");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if(userType.getBattlePassUserRecords3()==1){
|
||||
ToastUtil.show("没购买");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
LiveNetManager.get(mContext)
|
||||
.getRewards(String.valueOf(reward.getLiveBattlePassLevel()), String.valueOf(reward.getId()), new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
|
@ -86,6 +86,7 @@ public class BattlePassMissionFragment extends BaseFragment {
|
||||
ToastUtil.show(msg);
|
||||
Bus.get().post(new BattlePassTypeEvent(0));
|
||||
updateData();
|
||||
IMLoginManager.get(getContext()).upDataUserInfo();
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -11,6 +11,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.yunbao.common.bean.BattlePassUserInfoBean;
|
||||
import com.yunbao.common.bean.LiveBattlePassRewardsBean;
|
||||
import com.yunbao.common.dialog.ActivateEliteBattleOrderPopupWindow;
|
||||
import com.yunbao.common.dialog.LiberalBattlePassPopupWindow;
|
||||
@ -22,6 +23,7 @@ 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.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.adapter.BattlePassRewardAdapter;
|
||||
@ -29,11 +31,8 @@ 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;
|
||||
@ -86,7 +85,8 @@ public class BattlePassRewardFragment extends BaseFragment {
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(tab2, () -> {
|
||||
if(tab2.getTag()!=null){
|
||||
if (tab2.getTag() != null) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.battlepass_buy_max));
|
||||
return;
|
||||
}
|
||||
new XPopup.Builder(getContext())
|
||||
@ -109,7 +109,8 @@ public class BattlePassRewardFragment extends BaseFragment {
|
||||
.show();
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(tab3, () -> {
|
||||
if(tab3.getTag()!=null){
|
||||
if (tab3.getTag() != null) {
|
||||
ToastUtil.show(WordUtil.getNewString(R.string.battlepass_buy_max));
|
||||
return;
|
||||
}
|
||||
new XPopup.Builder(getContext())
|
||||
@ -121,6 +122,7 @@ public class BattlePassRewardFragment extends BaseFragment {
|
||||
new LiberalBattlePassPopupWindow.LiberalBattlePassCallback() {
|
||||
@Override
|
||||
public void onCallback(int code, String msg) {
|
||||
ToastUtil.show(msg);
|
||||
loadData();
|
||||
Bus.get().post(new BattlePassTypeEvent(0));
|
||||
}
|
||||
@ -133,13 +135,13 @@ public class BattlePassRewardFragment extends BaseFragment {
|
||||
|
||||
@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());
|
||||
@ -147,9 +149,7 @@ public class BattlePassRewardFragment extends BaseFragment {
|
||||
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);
|
||||
@ -158,10 +158,24 @@ public class BattlePassRewardFragment extends BaseFragment {
|
||||
list.get(1).get(2).setLock(2);
|
||||
type = 1;
|
||||
level = 3;*/
|
||||
setTab(type);
|
||||
adapter.setUserLevel(level);
|
||||
adapter.setUserType(type);
|
||||
adapter.setList(list);
|
||||
initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
private void initData() {
|
||||
LiveNetManager.get(getContext())
|
||||
.getBattlePassUserInfo(new HttpCallback<BattlePassUserInfoBean>() {
|
||||
@Override
|
||||
public void onSuccess(BattlePassUserInfoBean data) {
|
||||
setTab(data);
|
||||
adapter.setUserType(data);
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@ -171,25 +185,20 @@ public class BattlePassRewardFragment extends BaseFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setTab(int type) {
|
||||
if (type == 1) {
|
||||
tab1.setTag(true);
|
||||
private void setTab(BattlePassUserInfoBean data) {
|
||||
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) {
|
||||
if(data.getBattlePassUserRecords1()==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);
|
||||
}
|
||||
if(data.getBattlePassUserRecords2()==2){
|
||||
tab2.setTag(true);
|
||||
tab2.setImageResource(R.mipmap.ic_reward_tab_upgrade);
|
||||
}
|
||||
if(data.getBattlePassUserRecords3()==2){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -80,11 +80,13 @@
|
||||
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"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:layout_marginTop="26dp"
|
||||
android:id="@+id/context_layout"
|
||||
|
@ -3,7 +3,7 @@
|
||||
android:orientation="vertical"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="95dp"
|
||||
android:layout_width="100dp"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
@ -67,12 +67,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="彩鑽之翼(92天)"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="#0D21B2"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="1"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tab_1_layout" />
|
||||
@ -95,6 +97,7 @@
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:autoSizeTextType="uniform"
|
||||
android:textAllCaps="false"
|
||||
android:background="@mipmap/bg_zl_battlepass_exchange_btn_exchange"
|
||||
android:text="兌換\n(0/10)"
|
||||
android:textColor="#FFF"
|
||||
|
@ -37,13 +37,14 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="獎勵100經驗值/次"
|
||||
android:textColor="#F2F9FF"
|
||||
android:textSize="12sp"
|
||||
android:text="獎勵100經驗值/次"
|
||||
app:layout_constraintEnd_toStartOf="@+id/submit"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/title" />
|
||||
|
||||
@ -53,6 +54,7 @@
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="@string/battlepass_mission_submit_btn_unfinished"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="#FFFFFF"
|
||||
android:background="@drawable/bg_battlepass_mission_btn_unfinished"
|
||||
android:textSize="14sp"
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?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:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="210dp">
|
||||
@ -21,12 +23,14 @@
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView10"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="28dp"
|
||||
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"
|
||||
@ -62,15 +66,39 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="14dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center"
|
||||
>
|
||||
|
||||
<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" />
|
||||
android:layout_marginStart="1dp"
|
||||
android:layout_weight="1"
|
||||
android:progressDrawable="@drawable/bg_zl_user_level_progres"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
android:id="@+id/exp_text"
|
||||
tools:text="100/2500"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textColor="#41048F"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
@ -106,6 +134,7 @@
|
||||
android:layout_width="94dp"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:textAllCaps="false"
|
||||
android:background="@mipmap/bg_zl_user_button"
|
||||
android:text="@string/battlepass_user_more_integral"
|
||||
android:textColor="#FFFFFF"
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 42 KiB |
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 49 KiB |
@ -19,5 +19,6 @@
|
||||
<string name="battlepass_reward_item_lock">暫未達到等級</string>
|
||||
<string name="battlepass_reward_item_get">領取成功</string>
|
||||
<string name="battlepass_zl_get">開通成功</string>
|
||||
<string name="battlepass_buy_max">您已購買該戰令</string>
|
||||
|
||||
</resources>
|
@ -19,4 +19,5 @@
|
||||
<string name="battlepass_reward_item_lock">Not yet reached level</string>
|
||||
<string name="battlepass_reward_item_get">Successfully claimed</string>
|
||||
<string name="battlepass_zl_get">Successfully opened</string>
|
||||
<string name="battlepass_buy_max">You have purchased the BattlePass</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user