修改测试问题,新增直播列表页面的神龙送财的图标

This commit is contained in:
18401019693 2024-03-20 15:19:53 +08:00
parent 4fabf3aba3
commit 0317b339f8
9 changed files with 40 additions and 5 deletions

View File

@ -56,6 +56,18 @@ public class LiveBean implements Parcelable {
private int redPacketStatus;
@SerializedName("giftId")
private String giftId;
@SerializedName("sendMoneyLongStatus ")
private int sendMoneyLongStatus ;
public int getSendMoneyLongStatus() {
return sendMoneyLongStatus;
}
public LiveBean setSendMoneyLongStatus(int sendMoneyLongStatus) {
this.sendMoneyLongStatus = sendMoneyLongStatus;
return this;
}
private Map<String,String> params;//用于跳转Activity时扩展参数从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
public String getRecommendCardIconSizeTwo() {

View File

@ -34,7 +34,7 @@ public class GuardBuyTipsDialog {
dialog.setContentView(R.layout.dialog_guard_buy_tips);
dialog.setCancelable(true);
dialog.setCanceledOnTouchOutside(true);
Button btn_confirm = dialog.findViewById(R.id.btn_confirm);
TextView btn_confirm = dialog.findViewById(R.id.btn_confirm);
TextView content1 = dialog.findViewById(R.id.content1);
TextView content2 = dialog.findViewById(R.id.content2);
TextView contentTextView = dialog.findViewById(R.id.content);

View File

@ -8,7 +8,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="250dp"
android:layout_height="230dp"
android:background="@drawable/guard_buy_tips_bg">
<ImageView
@ -95,10 +95,14 @@
android:textSize="17dp" />
</RelativeLayout>
<Button
<TextView
android:id="@+id/btn_confirm"
android:layout_width="130dp"
android:gravity="center"
android:layout_height="38dp"
android:textColor="#893D0D"
android:textSize="15sp"
android:textStyle="bold"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/guard_buy_tips_sure_bg"

View File

@ -66,7 +66,7 @@ public class DragonSendsMoneyPopup extends CenterPopupView {
String dragonMoney = dragon_money.getText().toString().trim();
if (!TextUtils.isEmpty(dragonMoney)) {
long money = Long.parseLong(dragonMoney);
if (goldMoney > money) {
if (goldMoney >= money) {
if (money >= 1000) {
LiveNetManager.get(getContext())
.sendMoneyLong(mLiveUid, String.valueOf(money), new com.yunbao.common.http.base.HttpCallback<String>() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -32,7 +32,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
private ImageView mCover, liveType, mLiveIco, mType, pkico, drPkIco, pkAvatar, viewBg;
private ImageView bgs;
private View views;
private View redPacket;
private View redPacket, dragon_money;
private TextView mLiveState, mTitle, mName, mNum;
public MainHomeLiveItemViewHolder(@NonNull View itemView) {
@ -42,6 +42,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
itemView.findViewById(R.id.lt_week_list).setVisibility(View.GONE);
mCover = itemView.findViewById(R.id.cover);
redPacket = itemView.findViewById(R.id.red_packet);
dragon_money = itemView.findViewById(R.id.dragon_money);
bgs = itemView.findViewById(R.id.bgs);
liveType = itemView.findViewById(R.id.live_type);
views = itemView.findViewById(R.id.views);
@ -64,6 +65,7 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
* @param position 下标
*/
public void loadViewDate(LiveBean bean, int position, int height, OnItemClickListener listener) {
dragon_money.setVisibility(View.GONE);
Context mContext = itemView.getContext();
itemView.setTag(position);
liveType.setImageDrawable(null);
@ -153,7 +155,13 @@ public class MainHomeLiveItemViewHolder extends RecyclerView.ViewHolder {
redPacket.setVisibility(View.VISIBLE);
} else {
redPacket.setVisibility(View.GONE);
if (bean.getSendMoneyLongStatus() == 1) {
dragon_money.setVisibility(View.VISIBLE);
} else {
dragon_money.setVisibility(View.GONE);
}
}
RxView.clicks(itemView)
.throttleFirst(2, TimeUnit.SECONDS) // 才发送 2s内第1次点击按钮的事件
.subscribe(new Observer<Unit>() {

View File

@ -298,6 +298,17 @@
app:srcCompat="@mipmap/icon_red_packet"
tools:visibility="visible" />
<ImageView
android:id="@+id/dragon_money"
android:layout_width="36dp"
android:layout_height="39dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginStart="20dp"
android:layout_marginTop="25dp"
android:visibility="gone"
app:srcCompat="@mipmap/icon_live_dragon_money"
tools:visibility="visible" />
</RelativeLayout>
</LinearLayout>