From b2297b062e6ca7125c82275a37fd055d311665ee Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 16 Aug 2023 18:17:26 +0800 Subject: [PATCH] =?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 --- config.gradle | 2 +- .../live/views/LiveParcelItemViewHolder.java | 17 ++++++++---- live/src/main/res/layout/item_live_parcel.xml | 27 +++++++++++++++---- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/config.gradle b/config.gradle index 4e7ba2ebe..9c9604d4b 100644 --- a/config.gradle +++ b/config.gradle @@ -4,7 +4,7 @@ ext { buildToolsVersion: "29.0.2", minSdkVersion : 21, targetSdkVersion : 31, - versionCode : 440, + versionCode : 441, versionName : "6.5.4" ] manifestPlaceholders = [ diff --git a/live/src/main/java/com/yunbao/live/views/LiveParcelItemViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveParcelItemViewHolder.java index 3353538e2..97db3a9ea 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveParcelItemViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveParcelItemViewHolder.java @@ -18,6 +18,7 @@ import androidx.recyclerview.widget.RecyclerView; import com.lxj.xpopup.XPopup; import com.yunbao.common.bean.LiveGiftBean; +import com.yunbao.common.event.LiveGiftDialogEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.utils.Bus; @@ -26,18 +27,17 @@ import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.R; import com.yunbao.live.dialog.SendRendPacketPopup; -import com.yunbao.common.event.LiveGiftDialogEvent; import java.io.File; public class LiveParcelItemViewHolder extends RecyclerView.ViewHolder { private ImageView giftIcon, cornerMark; private Context mContext; - private TextView giftName, mPrice, giftNumber; + private TextView giftName, mPrice, giftNumber, expire; private RelativeLayout giftLayout; private ScaleAnimation mAnimation; private LinearLayout mLoadingLayout; - private ImageView mLoading; + private ImageView mLoading, mPayico; public LiveParcelItemViewHolder(@NonNull View itemView) { super(itemView); @@ -50,6 +50,8 @@ public class LiveParcelItemViewHolder extends RecyclerView.ViewHolder { cornerMark = itemView.findViewById(R.id.corner_mark); mLoadingLayout = itemView.findViewById(R.id.gift_loading_layout); mLoading = itemView.findViewById(R.id.gift_loading); + expire = itemView.findViewById(R.id.expire); + mPayico = itemView.findViewById(R.id.pay_ico); mAnimation = new ScaleAnimation(0.9f, 1.1f, 0.9f, 1.1f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); mAnimation.setInterpolator(new AccelerateDecelerateInterpolator()); @@ -75,9 +77,14 @@ public class LiveParcelItemViewHolder extends RecyclerView.ViewHolder { ImgLoader.display(mContext, model.getIcon(), giftIcon); ImgLoader.display(mContext, model.getCornerMark(), cornerMark); giftName.setText(model.getName()); - mPrice.setText(model.getEnd_time()); + expire.setText(model.getEnd_time()); + if (model.getSendType() != null && model.getSendType().equals("1")) { + mPayico.setImageResource(R.mipmap.gold_coin); + } else { + mPayico.setImageResource(R.mipmap.diamond); + } + mPrice.setText(model.getPrice()); giftNumber.setText(model.getGiftNum()); - if (model.getSwf() != null && model.getSwf().isEmpty()) { mLoadingLayout.setVisibility(View.GONE); } else { diff --git a/live/src/main/res/layout/item_live_parcel.xml b/live/src/main/res/layout/item_live_parcel.xml index c0ff90185..69e853d96 100644 --- a/live/src/main/res/layout/item_live_parcel.xml +++ b/live/src/main/res/layout/item_live_parcel.xml @@ -21,11 +21,28 @@ android:layout_width="wrap_content" android:layout_height="55dp"> + + + + + + - + android:visibility="visible" />