Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a920b61bc4
@ -34,6 +34,13 @@ public class BattlePassPoints extends BaseModel{
|
|||||||
@SerializedName("exchange_status_remark")
|
@SerializedName("exchange_status_remark")
|
||||||
private String exchangeMark;
|
private String exchangeMark;
|
||||||
|
|
||||||
|
@SerializedName("send_reward_type")
|
||||||
|
private int sendRewardType;
|
||||||
|
@SerializedName("send_gift_type")
|
||||||
|
private int sendGiftType;
|
||||||
|
@SerializedName("send_gift_needcoin")
|
||||||
|
private String sendGiftNeedcoin;
|
||||||
|
|
||||||
public BattlePassPoints() {
|
public BattlePassPoints() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,4 +179,54 @@ public class BattlePassPoints extends BaseModel{
|
|||||||
public void setPointsThresholdText(String pointsThresholdText) {
|
public void setPointsThresholdText(String pointsThresholdText) {
|
||||||
this.pointsThresholdText = pointsThresholdText;
|
this.pointsThresholdText = pointsThresholdText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getSendRewardType() {
|
||||||
|
return sendRewardType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendRewardType(int sendRewardType) {
|
||||||
|
this.sendRewardType = sendRewardType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSendGiftType() {
|
||||||
|
return sendGiftType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendGiftType(int sendGiftType) {
|
||||||
|
this.sendGiftType = sendGiftType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendGiftNeedcoin() {
|
||||||
|
return sendGiftNeedcoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSendGiftNeedcoin(String sendGiftNeedcoin) {
|
||||||
|
this.sendGiftNeedcoin = sendGiftNeedcoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "BattlePassPoints{" +
|
||||||
|
"id=" + id +
|
||||||
|
", type=" + type +
|
||||||
|
", rewardsName='" + rewardsName + '\'' +
|
||||||
|
", rewardsId=" + rewardsId +
|
||||||
|
", imageUrl='" + imageUrl + '\'' +
|
||||||
|
", pointsThreshold='" + pointsThreshold + '\'' +
|
||||||
|
", pointsThresholdText='" + pointsThresholdText + '\'' +
|
||||||
|
", rewardsValue='" + rewardsValue + '\'' +
|
||||||
|
", battlePassLevel=" + battlePassLevel +
|
||||||
|
", exchangeQuantity=" + exchangeQuantity +
|
||||||
|
", liveBattlePassTypeId=" + liveBattlePassTypeId +
|
||||||
|
", description='" + description + '\'' +
|
||||||
|
", restrictTime=" + restrictTime +
|
||||||
|
", sort=" + sort +
|
||||||
|
", exchangeStatus=" + exchangeStatus +
|
||||||
|
", userQuintyCount=" + userQuintyCount +
|
||||||
|
", exchangeMark='" + exchangeMark + '\'' +
|
||||||
|
", sendRewardType=" + sendRewardType +
|
||||||
|
", sendGiftType=" + sendGiftType +
|
||||||
|
", sendRewardNeedcoin='" + sendGiftNeedcoin + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -277,30 +277,30 @@ public class SudGameListPopup extends BottomPopupView {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (interactionID == 0) {
|
if (interactionID == 0) {
|
||||||
gameTitle.setTextColor(getYellowColor());
|
|
||||||
} else {
|
|
||||||
gameTitle.setTextColor(getDefColor());
|
gameTitle.setTextColor(getDefColor());
|
||||||
|
} else {
|
||||||
|
gameTitle.setTextColor(getYellowColor());
|
||||||
}
|
}
|
||||||
if (mSill.equals("0,0,0")) {
|
if (mSill.equals("0,0,0")) {
|
||||||
sillTitle.setTextColor(getYellowColor());
|
|
||||||
} else {
|
|
||||||
sillTitle.setTextColor(getDefColor());
|
sillTitle.setTextColor(getDefColor());
|
||||||
|
} else {
|
||||||
|
sillTitle.setTextColor(getYellowColor());
|
||||||
}
|
}
|
||||||
if ("0".equals(roomHolderType)) {
|
if ("0".equals(roomHolderType)) {
|
||||||
houseOwnerTitle.setTextColor(getYellowColor());
|
|
||||||
} else {
|
|
||||||
houseOwnerTitle.setTextColor(getDefColor());
|
houseOwnerTitle.setTextColor(getDefColor());
|
||||||
|
} else {
|
||||||
|
houseOwnerTitle.setTextColor(getYellowColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getYellowColor() {
|
||||||
|
return Color.parseColor("#FF8D41");
|
||||||
|
}
|
||||||
|
|
||||||
private int getDefColor() {
|
private int getDefColor() {
|
||||||
return Color.WHITE;
|
return Color.WHITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getYellowColor() {
|
|
||||||
return Color.YELLOW;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dismiss() {
|
public void dismiss() {
|
||||||
Bus.getOff(this);
|
Bus.getOff(this);
|
||||||
@ -318,9 +318,9 @@ public class SudGameListPopup extends BottomPopupView {
|
|||||||
public void onSudGameListEvent(SudGameListEvent event) {
|
public void onSudGameListEvent(SudGameListEvent event) {
|
||||||
interactionID = event.getInteractionID();
|
interactionID = event.getInteractionID();
|
||||||
if (interactionID == 0) {
|
if (interactionID == 0) {
|
||||||
gameTitle.setTextColor(getYellowColor());
|
|
||||||
} else {
|
|
||||||
gameTitle.setTextColor(getDefColor());
|
gameTitle.setTextColor(getDefColor());
|
||||||
|
} else {
|
||||||
|
gameTitle.setTextColor(getYellowColor());
|
||||||
}
|
}
|
||||||
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
|
||||||
gameTitle.setText(event.getTitle());
|
gameTitle.setText(event.getTitle());
|
||||||
@ -355,9 +355,9 @@ public class SudGameListPopup extends BottomPopupView {
|
|||||||
sillTitle.setText(mSillName.substring(0, mSillName.length() - 2));
|
sillTitle.setText(mSillName.substring(0, mSillName.length() - 2));
|
||||||
}
|
}
|
||||||
if (mSill.equals("0,0,0")) {
|
if (mSill.equals("0,0,0")) {
|
||||||
sillTitle.setTextColor(getYellowColor());
|
|
||||||
} else {
|
|
||||||
sillTitle.setTextColor(getDefColor());
|
sillTitle.setTextColor(getDefColor());
|
||||||
|
} else {
|
||||||
|
sillTitle.setTextColor(getYellowColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectAnimator animator = ObjectAnimator.ofFloat(roomSillArrow, "rotation", 90f, 0f);
|
ObjectAnimator animator = ObjectAnimator.ofFloat(roomSillArrow, "rotation", 90f, 0f);
|
||||||
@ -378,9 +378,9 @@ public class SudGameListPopup extends BottomPopupView {
|
|||||||
animator.start();
|
animator.start();
|
||||||
mRefreshView.initData();
|
mRefreshView.initData();
|
||||||
if ("0".equals(roomHolderType)) {
|
if ("0".equals(roomHolderType)) {
|
||||||
houseOwnerTitle.setTextColor(getYellowColor());
|
|
||||||
} else {
|
|
||||||
houseOwnerTitle.setTextColor(getDefColor());
|
houseOwnerTitle.setTextColor(getDefColor());
|
||||||
|
} else {
|
||||||
|
houseOwnerTitle.setTextColor(getYellowColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@ -76,6 +77,10 @@ public class BattlePassExchangeAdapter extends RecyclerView.Adapter<BattlePassEx
|
|||||||
private View mark;
|
private View mark;
|
||||||
private TextView markText;
|
private TextView markText;
|
||||||
|
|
||||||
|
LinearLayout topMoneySubscript;
|
||||||
|
TextView topMoney;
|
||||||
|
ImageView topMoneyIcon;
|
||||||
|
|
||||||
|
|
||||||
public VH(@NonNull View itemView) {
|
public VH(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
@ -87,6 +92,10 @@ public class BattlePassExchangeAdapter extends RecyclerView.Adapter<BattlePassEx
|
|||||||
mark = itemView.findViewById(R.id.mark_layout);
|
mark = itemView.findViewById(R.id.mark_layout);
|
||||||
markText = itemView.findViewById(R.id.mark_text);
|
markText = itemView.findViewById(R.id.mark_text);
|
||||||
indicator.setVisibility(View.GONE);
|
indicator.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
topMoney = itemView.findViewById(R.id.top_money_text);
|
||||||
|
topMoneyIcon = itemView.findViewById(R.id.top_money_icon);
|
||||||
|
topMoneySubscript = itemView.findViewById(R.id.top_money_layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setData(BattlePassPoints battlePassPoints) {
|
public void setData(BattlePassPoints battlePassPoints) {
|
||||||
@ -100,6 +109,25 @@ public class BattlePassExchangeAdapter extends RecyclerView.Adapter<BattlePassEx
|
|||||||
markText.setText(battlePassPoints.getExchangeMark());
|
markText.setText(battlePassPoints.getExchangeMark());
|
||||||
}
|
}
|
||||||
submit.setOnClickListener(null);
|
submit.setOnClickListener(null);
|
||||||
|
topMoneyIcon.setVisibility(View.VISIBLE);
|
||||||
|
switch (battlePassPoints.getSendGiftType()) {
|
||||||
|
case 0:
|
||||||
|
topMoneyIcon.setImageResource(R.mipmap.diamond);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
topMoneyIcon.setImageResource(R.mipmap.gold_coin);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
topMoneyIcon.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
topMoney.setText(String.valueOf(battlePassPoints.getSendGiftNeedcoin()));
|
||||||
|
if (battlePassPoints.getSendGiftType() == 999) {
|
||||||
|
topMoney.setText(String.format("%s%s", battlePassPoints.getRestrictTime(), WordUtil.isNewZh() ? "天" : "Day"));
|
||||||
|
if (battlePassPoints.getRestrictTime() == 0) {
|
||||||
|
topMoney.setText(WordUtil.isNewZh() ? "永久" : "Forever");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (battlePassPoints.getExchangeStatus() == 1) {
|
if (battlePassPoints.getExchangeStatus() == 1) {
|
||||||
submit.setText(WordUtil.getNewString(R.string.battlepass_exchange_submit_lock));
|
submit.setText(WordUtil.getNewString(R.string.battlepass_exchange_submit_lock));
|
||||||
submit.setBackgroundResource(R.mipmap.bg_zl_battlepass_exchange_btn_lock);
|
submit.setBackgroundResource(R.mipmap.bg_zl_battlepass_exchange_btn_lock);
|
||||||
@ -127,7 +155,7 @@ public class BattlePassExchangeAdapter extends RecyclerView.Adapter<BattlePassEx
|
|||||||
.enableDrag(false)
|
.enableDrag(false)
|
||||||
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
|
.maxWidth(DeviceUtils.getScreenHeight((Activity) mContext) - DpUtil.dp2px(34))
|
||||||
.asCustom(new WarOrderExchangeDetailsPopupWindow(mContext,
|
.asCustom(new WarOrderExchangeDetailsPopupWindow(mContext,
|
||||||
battlePassPoints.getExchangeQuantity()-battlePassPoints.getUserQuintyCount(),
|
battlePassPoints.getExchangeQuantity() - battlePassPoints.getUserQuintyCount(),
|
||||||
point,
|
point,
|
||||||
Integer.parseInt(battlePassPoints.getPointsThreshold()),
|
Integer.parseInt(battlePassPoints.getPointsThreshold()),
|
||||||
battlePassPoints.getImageUrl(),
|
battlePassPoints.getImageUrl(),
|
||||||
|
@ -60,6 +60,35 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/top_money_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@mipmap/ic_zl_battlpas_exchange_top_subscript"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/top_money_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="1dp"
|
||||||
|
android:layout_marginBottom="1dp"
|
||||||
|
android:layout_marginEnd="1dp"
|
||||||
|
android:textColor="#fff"
|
||||||
|
android:textSize="11sp"
|
||||||
|
tools:text="10000" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/top_money_icon"
|
||||||
|
android:layout_width="10dp"
|
||||||
|
android:layout_height="10dp"
|
||||||
|
android:layout_marginEnd="1dp"
|
||||||
|
android:src="@mipmap/gold_coin" />
|
||||||
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user