6.5.4礼物冠名

This commit is contained in:
18401019693 2023-08-16 18:17:26 +08:00
parent b53472de28
commit b2297b062e
3 changed files with 35 additions and 11 deletions

View File

@ -4,7 +4,7 @@ ext {
buildToolsVersion: "29.0.2", buildToolsVersion: "29.0.2",
minSdkVersion : 21, minSdkVersion : 21,
targetSdkVersion : 31, targetSdkVersion : 31,
versionCode : 440, versionCode : 441,
versionName : "6.5.4" versionName : "6.5.4"
] ]
manifestPlaceholders = [ manifestPlaceholders = [

View File

@ -18,6 +18,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.lxj.xpopup.XPopup; import com.lxj.xpopup.XPopup;
import com.yunbao.common.bean.LiveGiftBean; import com.yunbao.common.bean.LiveGiftBean;
import com.yunbao.common.event.LiveGiftDialogEvent;
import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.utils.Bus; 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.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.R; import com.yunbao.live.R;
import com.yunbao.live.dialog.SendRendPacketPopup; import com.yunbao.live.dialog.SendRendPacketPopup;
import com.yunbao.common.event.LiveGiftDialogEvent;
import java.io.File; import java.io.File;
public class LiveParcelItemViewHolder extends RecyclerView.ViewHolder { public class LiveParcelItemViewHolder extends RecyclerView.ViewHolder {
private ImageView giftIcon, cornerMark; private ImageView giftIcon, cornerMark;
private Context mContext; private Context mContext;
private TextView giftName, mPrice, giftNumber; private TextView giftName, mPrice, giftNumber, expire;
private RelativeLayout giftLayout; private RelativeLayout giftLayout;
private ScaleAnimation mAnimation; private ScaleAnimation mAnimation;
private LinearLayout mLoadingLayout; private LinearLayout mLoadingLayout;
private ImageView mLoading; private ImageView mLoading, mPayico;
public LiveParcelItemViewHolder(@NonNull View itemView) { public LiveParcelItemViewHolder(@NonNull View itemView) {
super(itemView); super(itemView);
@ -50,6 +50,8 @@ public class LiveParcelItemViewHolder extends RecyclerView.ViewHolder {
cornerMark = itemView.findViewById(R.id.corner_mark); cornerMark = itemView.findViewById(R.id.corner_mark);
mLoadingLayout = itemView.findViewById(R.id.gift_loading_layout); mLoadingLayout = itemView.findViewById(R.id.gift_loading_layout);
mLoading = itemView.findViewById(R.id.gift_loading); 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 = 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()); mAnimation.setInterpolator(new AccelerateDecelerateInterpolator());
@ -75,9 +77,14 @@ public class LiveParcelItemViewHolder extends RecyclerView.ViewHolder {
ImgLoader.display(mContext, model.getIcon(), giftIcon); ImgLoader.display(mContext, model.getIcon(), giftIcon);
ImgLoader.display(mContext, model.getCornerMark(), cornerMark); ImgLoader.display(mContext, model.getCornerMark(), cornerMark);
giftName.setText(model.getName()); 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()); giftNumber.setText(model.getGiftNum());
if (model.getSwf() != null && model.getSwf().isEmpty()) { if (model.getSwf() != null && model.getSwf().isEmpty()) {
mLoadingLayout.setVisibility(View.GONE); mLoadingLayout.setVisibility(View.GONE);
} else { } else {

View File

@ -21,12 +21,29 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="55dp"> android:layout_height="55dp">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView <ImageView
android:id="@+id/gift_icon" android:id="@+id/gift_icon"
android:layout_width="55dp" android:layout_width="55dp"
android:layout_height="55dp" /> android:layout_height="55dp" />
<TextView
android:id="@+id/expire"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginBottom="2dp"
android:background="#D996cff0"
android:gravity="center"
android:textColor="@color/color_white"
android:textSize="8sp"
android:visibility="visible" />
</FrameLayout>
<TextView <TextView
android:id="@+id/gift_number" android:id="@+id/gift_number"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -59,7 +76,7 @@
android:layout_width="12dp" android:layout_width="12dp"
android:layout_height="12dp" android:layout_height="12dp"
android:layout_marginEnd="2dp" android:layout_marginEnd="2dp"
android:visibility="gone" /> android:visibility="visible" />
<TextView <TextView
android:id="@+id/price" android:id="@+id/price"