6.5.4礼物冠名

This commit is contained in:
18401019693
2023-08-05 15:22:49 +08:00
parent 9588619b73
commit dfeb1c246b
20 changed files with 103 additions and 56 deletions

View File

@@ -550,7 +550,7 @@ public class JavascriptInterfaceUtils {
}
@JavascriptInterface
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl) {
RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0);
public void toGiftNamingAlertAllPageView(String mAnchorName, String mLiveUid, String mAvatarUrl,int isAnchor ) {
RouteUtil.forwardGiftWallActivity("", mAnchorName, mLiveUid, mAvatarUrl, 0,isAnchor==1);
}
}

View File

@@ -233,13 +233,14 @@ public class RouteUtil {
postcard.navigation();
}
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention) {
public static void forwardGiftWallActivity(String mStream, String mAnchorName, String mLiveUid, String mAvatarUrl, int isAttention,boolean isLive) {
ARouter.getInstance().build(PATH_GIFT_WALL)
.withString(Constants.LIVE_UID, mLiveUid)
.withString(Constants.STREAM, mStream)
.withString("mAnchorName", mAnchorName)
.withString("mAvatarUrl", mAvatarUrl)
.withInt("isAttention", isAttention)
.withBoolean("isLive",isLive)
.navigation();
}

View File

@@ -16,16 +16,18 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class GiftAlreadyWallViewHolder extends RecyclerView.ViewHolder {
private ImageView giftImg;
private TextView giftTitle;
private TextView giftTitle, giftNumber;
public GiftAlreadyWallViewHolder(@NonNull View itemView) {
super(itemView);
giftImg = itemView.findViewById(R.id.gift_img);
giftTitle = itemView.findViewById(R.id.gift_title);
giftNumber = itemView.findViewById(R.id.gift_number);
}
public void showData(GiftWallModel giftWallModel) {
giftTitle.setText(giftWallModel.getGiftname());
giftNumber.setText("*" + giftWallModel.getGiftCountNumber());
ImgLoader.display(itemView.getContext(), giftWallModel.getGifticon(), giftImg);
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override

View File

@@ -1,6 +1,7 @@
package com.yunbao.common.views;
import android.content.Context;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -13,6 +14,7 @@ import com.yunbao.common.adapter.GiftNumberAdapter;
import com.yunbao.common.event.GiftNumberEvent;
import com.yunbao.common.manager.GiftQuantityManager;
import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import org.greenrobot.eventbus.Subscribe;
@@ -52,10 +54,23 @@ public class GiftNumberPopup extends BottomPopupView {
new XPopup.Builder(getContext())
.asCustom(new InputCustomPopup(getContext(),
getContext().getString(R.string.the_title_financier3),
R.string.custom_quantity,true).setListener(new InputCustomPopup.InputCustomListener() {
R.string.custom_quantity, true).setListener(new InputCustomPopup.InputCustomListener() {
@Override
public void onConfirm(String text) {
Bus.get().post(new GiftNumberEvent().setmCount(text));
if (!TextUtils.isEmpty(text)) {
int number = Integer.parseInt(text);
if (1 <= number && number <= 9999) {
Bus.get().post(new GiftNumberEvent().setmCount(text));
} else {
ToastUtil.show(String.format(getContext().getString(R.string.range_range_is), "1~9999"));
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
}
} else {
ToastUtil.show(String.format(getContext().getString(R.string.range_range_is), "1~9999"));
Bus.get().post(new GiftNumberEvent().setmCount("-1"));
}
}
})).show();