Merge branch 'master' into dev_6.5.4_tmp

This commit is contained in:
zlzw 2023-08-04 16:13:14 +08:00
commit e43fb5e479
6 changed files with 43 additions and 4 deletions

View File

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

View File

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

View File

@ -15,7 +15,7 @@
<LinearLayout
android:layout_width="80dp"
android:layout_height="212dp"
android:layout_height="190dp"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="48dp"

View File

@ -1304,5 +1304,6 @@ Limited ride And limited avatar frame</string>
<string name="title_anchor">冠名主播:</string>
<string name="the_title_financier">冠名金主:</string>
<string name="the_title_financier2">冠名</string>
<string name="the_title_financier3">请输入自定义数量</string>
</resources>

View File

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

View File

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