From 545c69ff8b826e4f6a29b5c549c8e711589b778d Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 4 Aug 2023 15:50:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/views/GiftNumberPopup.java | 18 ++++++++++++++++++ .../yunbao/common/views/InputCustomPopup.java | 19 +++++++++++++++++-- .../main/res/layout/view_live_gift_number.xml | 2 +- common/src/main/res/values/strings.xml | 1 + .../com/yunbao/live/dialog/LiveGiftPopup.java | 3 ++- 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/views/GiftNumberPopup.java b/common/src/main/java/com/yunbao/common/views/GiftNumberPopup.java index 54ddcdfea..bb9057ec9 100644 --- a/common/src/main/java/com/yunbao/common/views/GiftNumberPopup.java +++ b/common/src/main/java/com/yunbao/common/views/GiftNumberPopup.java @@ -6,6 +6,7 @@ import androidx.annotation.NonNull; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; +import com.lxj.xpopup.XPopup; import com.lxj.xpopup.core.BottomPopupView; import com.yunbao.common.R; import com.yunbao.common.adapter.GiftNumberAdapter; @@ -41,6 +42,23 @@ public class GiftNumberPopup extends BottomPopupView { @Override public void onViewClicks() { dismiss(); + Bus.get().post(new GiftNumberEvent().setmCount("-1")); + } + }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.custom_quantity), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + dismiss(); + new XPopup.Builder(getContext()) + .asCustom(new InputCustomPopup(getContext(), + getContext().getString(R.string.the_title_financier3), + R.string.custom_quantity,true).setListener(new InputCustomPopup.InputCustomListener() { + @Override + public void onConfirm(String text) { + Bus.get().post(new GiftNumberEvent().setmCount(text)); + } + })).show(); + } }); } diff --git a/common/src/main/java/com/yunbao/common/views/InputCustomPopup.java b/common/src/main/java/com/yunbao/common/views/InputCustomPopup.java index bfffdb1d5..b2598cd14 100644 --- a/common/src/main/java/com/yunbao/common/views/InputCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/InputCustomPopup.java @@ -1,6 +1,7 @@ package com.yunbao.common.views; import android.content.Context; +import android.text.InputType; import android.text.TextUtils; import android.view.View; import android.widget.EditText; @@ -20,6 +21,7 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake; public class InputCustomPopup extends CenterPopupView { private String message = ""; private int title = R.string.dialog_tip; + private boolean isType; public InputCustomPopup(@NonNull Context context, String message, int title) { super(context); @@ -27,7 +29,14 @@ public class InputCustomPopup extends CenterPopupView { this.title = title; } - public InputCustomPopup(@NonNull Context context,int title) { + public InputCustomPopup(@NonNull Context context, String message, int title, boolean isType) { + super(context); + this.message = message; + this.title = title; + this.isType = isType; + } + + public InputCustomPopup(@NonNull Context context, int title) { super(context); this.title = title; } @@ -44,7 +53,13 @@ public class InputCustomPopup extends CenterPopupView { super.onCreate(); EditText content = findViewById(R.id.content); TextView titleText = findViewById(R.id.title); - content.setText(message); + + if (isType) { + content.setHint(message); + content.setInputType(InputType.TYPE_CLASS_NUMBER); + } else { + content.setText(message); + } titleText.setText(title); findViewById(R.id.btn_cancel).setOnClickListener(new OnClickListener() { @Override diff --git a/common/src/main/res/layout/view_live_gift_number.xml b/common/src/main/res/layout/view_live_gift_number.xml index 241947d70..8d9958c16 100644 --- a/common/src/main/res/layout/view_live_gift_number.xml +++ b/common/src/main/res/layout/view_live_gift_number.xml @@ -15,7 +15,7 @@ 冠名主播: 冠名金主: 冠名 + 请输入自定义数量 diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index 3e99a8762..34cb9db3e 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -640,8 +640,9 @@ public class LiveGiftPopup extends AbsDialogFragment { @Subscribe(threadMode = ThreadMode.MAIN) public void onGiftNumberEvent(GiftNumberEvent event) { if (TextUtils.equals(event.getmCount(), "-1")) { - + ImgLoader.display(getContext(), R.mipmap.icon_arrow_right_2, iconArrow); } else { + ImgLoader.display(getContext(), R.mipmap.icon_arrow_right_2, iconArrow); mCount = event.getmCount(); giftNumber.setText(mCount); } From 0c096dcafc68044d9bda0b4567c8ef263516b0c5 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 4 Aug 2023 15:59:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/src/main/java/com/yunbao/main/http/MainHttpUtil.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java index 0dd121ac5..bb69e074b 100644 --- a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java +++ b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java @@ -501,6 +501,7 @@ public class MainHttpUtil { HttpClient.getInstance().get("Login.getCode", MainHttpConsts.GET_REGISTER_CODE) .params("mobile", mobile) .params("sign", sign) + .params("source", "1") .execute(callback); } @@ -522,6 +523,7 @@ public class MainHttpUtil { .params("Ticket", Ticket) .params("MacAddress", macUitl.getNewMac()) .params("Imei", uuid) + .params("source", "1") .execute(callback); } @@ -622,6 +624,7 @@ public class MainHttpUtil { HttpClient.getInstance().get("Login.getCode", MainHttpConsts.GET_FIND_PWD_CODE) .params("mobile", mobile) .params("country_code", country_code) + .params("source", "1") .execute(callback); } @@ -631,6 +634,7 @@ public class MainHttpUtil { */ public static void getQrCode(HttpCallback callback) { HttpClient.getInstance().get("Agent.getCode", MainHttpConsts.GET_QR_CODE) + .params("source", "1") .execute(callback); }