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);
}
}

View File

@@ -11,8 +11,9 @@
android:id="@+id/gift_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="dadsad"
android:text="中文测试中文测试"
android:layout_weight="1"
android:maxEms="9"
android:textColor="@color/white"
android:textSize="16sp" />

View File

@@ -33,7 +33,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/user_list"
android:layout_width="200dp"
android:layout_width="250dp"
tools:listitem="@layout/view_red_packet_luck_user"
android:layout_height="241dp"
android:layout_marginTop="26dp" />

View File

@@ -174,6 +174,18 @@
android:text="@string/following_anchor"
android:textColor="#FDD04A"
android:textSize="10sp" />
<Button
android:id="@+id/fans_group"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_gravity="end"
android:layout_marginStart="5dp"
android:layout_weight="1"
android:background="@drawable/background_red_packet_select"
android:gravity="center"
android:text="@string/live_send_red_packge_fans_group"
android:textColor="#FDD04A"
android:textSize="10sp" />
</LinearLayout>
</LinearLayout>
@@ -232,8 +244,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_send_red_packet_illustrate"
android:visibility="gone"
tools:visibility="visible">
android:visibility="gone">
<androidx.core.widget.NestedScrollView