update 红包优化

This commit is contained in:
2023-08-23 16:37:53 +08:00
parent 75b176a81e
commit 52f1a78e36
13 changed files with 64 additions and 20 deletions

View File

@@ -95,6 +95,11 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
}
userID = redPacketInfoModel.getUserId();
if(redPacketInfoModel.getIsFans()){
ToastUtil.show("粉丝团红包");
}else{
ToastUtil.show("普通红包");
}
}
private Handler timeHandler = new Handler();

View File

@@ -24,7 +24,7 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.R;
public class SendRendPacketPopup extends CenterPopupView {
private Button thereIsNo, followingAnchor;
private Button thereIsNo, followingAnchor, joinFansGroup;
private TextView redEnvelopeRill, totalConsumptionOfDrill;
private TextView rill, total;
private FrameLayout redPacketIllustrate;
@@ -58,6 +58,7 @@ public class SendRendPacketPopup extends CenterPopupView {
redPacketIllustrate = findViewById(R.id.red_packet_illustrate);
illustrateClose = findViewById(R.id.illustrate_close);
iconInstructions = findViewById(R.id.icon_instructions);
joinFansGroup = findViewById(R.id.fans_group);
rill = findViewById(R.id.rill);
total = findViewById(R.id.total);
selectText(thereIsNo, true);
@@ -65,13 +66,21 @@ public class SendRendPacketPopup extends CenterPopupView {
ViewClicksAntiShake.clicksAntiShake(thereIsNo, () -> {
selectText(thereIsNo, true);
selectText(followingAnchor, false);
selectText(joinFansGroup, false);
conditions = "0";
});
ViewClicksAntiShake.clicksAntiShake(followingAnchor, () -> {
selectText(thereIsNo, false);
selectText(joinFansGroup, false);
selectText(followingAnchor, true);
conditions = "1";
});
ViewClicksAntiShake.clicksAntiShake(joinFansGroup, () -> {
selectText(thereIsNo, false);
selectText(joinFansGroup, true);
selectText(followingAnchor, false);
conditions = "0";
});
redEnvelopeRill.setText(String.format(getContext().getString(R.string.red_envelope_rill), "0"));
totalConsumptionOfDrill.setText(String.format(getContext().getString(R.string.total_consumption_of_drill), "0"));
rill.addTextChangedListener(new TextWatcher() {
@@ -198,7 +207,9 @@ public class SendRendPacketPopup extends CenterPopupView {
.createRedPacket(mLiveID,
rillNumber,
number,
conditions, new HttpCallback<String>() {
conditions,
joinFansGroup.getTag() != null && (boolean) joinFansGroup.getTag(),
new HttpCallback<String>() {
@Override
public void onSuccess(String data) {
ToastUtil.show(getContext().getString(R.string.red_envelope_released_successfully));
@@ -214,10 +225,10 @@ public class SendRendPacketPopup extends CenterPopupView {
}
});
if(WordUtil.isNewZh()){
((ImageView)findViewById(R.id.red_packet_info_img)).setImageResource(R.mipmap.bg_red_packet_info_zh);
}else{
((ImageView)findViewById(R.id.red_packet_info_img)).setImageResource(R.mipmap.bg_red_packet_info_en);
if (WordUtil.isNewZh()) {
((ImageView) findViewById(R.id.red_packet_info_img)).setImageResource(R.mipmap.bg_red_packet_info_zh);
} else {
((ImageView) findViewById(R.id.red_packet_info_img)).setImageResource(R.mipmap.bg_red_packet_info_en);
}
}
@@ -225,8 +236,10 @@ public class SendRendPacketPopup extends CenterPopupView {
textView.setSelected(select);
if (select) {
textView.setTextColor(Color.parseColor("#E12801"));
textView.setTag(true);
} else {
textView.setTextColor(Color.parseColor("#FDD04A"));
textView.setTag(false);
}
}