礼物墙功能
This commit is contained in:
@@ -67,6 +67,7 @@ public class LiveReceiveGiftBean extends BaseModel {
|
||||
private String msg;
|
||||
private String msg_en;
|
||||
private String guard_type;
|
||||
private int user_naming_status;
|
||||
private AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent;
|
||||
private boolean showB;
|
||||
|
||||
@@ -288,6 +289,14 @@ public class LiveReceiveGiftBean extends BaseModel {
|
||||
this.hot_num = hot_num;
|
||||
}
|
||||
|
||||
public int getUser_naming_status() {
|
||||
return user_naming_status;
|
||||
}
|
||||
|
||||
public void setUser_naming_status(int user_naming_status) {
|
||||
this.user_naming_status = user_naming_status;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
@@ -1024,8 +1024,8 @@ public class LiveGiftAnimPresenter {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
showGifGift(bean);
|
||||
showNormalGift(bean);
|
||||
} else {
|
||||
showNormalGift(bean);
|
||||
}
|
||||
|
||||
@@ -1242,6 +1242,7 @@ public class SocketRyClient {
|
||||
receiveGiftBean.setNamingLiveName(map.getString("naming_live_name"));
|
||||
receiveGiftBean.setNamingUid(map.getString("naming_uid"));
|
||||
receiveGiftBean.setNamingLiveuid(map.getString("naming_liveuid"));
|
||||
receiveGiftBean.setUser_naming_status(map.getInteger("user_naming_status"));
|
||||
receiveGiftBean.setmLiveUId(mLiveUid);
|
||||
receiveGiftBean.setmTypeBuyGuard(false);
|
||||
receiveGiftBean.setAllServerNotify(false);
|
||||
|
||||
@@ -1142,6 +1142,7 @@ public class SocketSwClient {
|
||||
receiveGiftBean.setNamingLiveName(map.getString("naming_live_name"));
|
||||
receiveGiftBean.setNamingUid(map.getString("naming_uid"));
|
||||
receiveGiftBean.setNamingLiveuid(map.getString("naming_liveuid"));
|
||||
receiveGiftBean.setUser_naming_status(map.getInteger("user_naming_status"));
|
||||
receiveGiftBean.setmLiveUId(mLiveUid);
|
||||
receiveGiftBean.setmTypeBuyGuard(false);
|
||||
receiveGiftBean.setAllServerNotify(false);
|
||||
|
||||
@@ -19,6 +19,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.utils.MobclickAgent;
|
||||
import com.yunbao.common.bean.LiveGiftBean;
|
||||
import com.yunbao.common.event.LiveGiftDialogEvent;
|
||||
@@ -26,7 +27,9 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.MarqueeTextView;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.dialog.SendRendPacketPopup;
|
||||
@@ -41,6 +44,9 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
||||
private ScaleAnimation mAnimation;
|
||||
private LinearLayout mLoadingLayout;
|
||||
private ImageView mLoading;
|
||||
private LinearLayout namingLayout;
|
||||
private MarqueeTextView naming_name;
|
||||
private RoundedImageView avatar;
|
||||
|
||||
public FrameGiftViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
@@ -54,6 +60,10 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
||||
mLoadingLayout = itemView.findViewById(R.id.gift_loading_layout);
|
||||
mLoading = itemView.findViewById(R.id.gift_loading);
|
||||
|
||||
namingLayout = itemView.findViewById(R.id.namingLayout);
|
||||
naming_name = itemView.findViewById(R.id.naming_name);
|
||||
avatar = itemView.findViewById(R.id.avatar);
|
||||
|
||||
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.setDuration(400);
|
||||
@@ -89,7 +99,8 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
||||
// } else {
|
||||
giftName.setText(model.getName());
|
||||
// }
|
||||
|
||||
naming_name.setText(model.getNamingLiveName());
|
||||
ImgLoader.display(mContext,model.getNamingLiveAvatar(),avatar);
|
||||
//特殊礼物红包
|
||||
if (model.getType() == 9999999) {
|
||||
mPayIco.setVisibility(View.GONE);
|
||||
@@ -114,7 +125,11 @@ public class FrameGiftViewHolder extends RecyclerView.ViewHolder {
|
||||
} else {
|
||||
mLoadingLayout.setVisibility(GiftCacheUtil.checkGiftIsDownload(model.getId()) ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
if(model.isChecked()&& !StringUtil.isEmpty(model.getNamingLiveName())){
|
||||
namingLayout.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
namingLayout.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ public class LiveGiftViewHolder extends AbsViewHolder {
|
||||
private TextView mGiftCount;
|
||||
private TextView mGiftGroupCount;
|
||||
private TextView mMulSign;//乘号
|
||||
private ImageView giftNamingIcon;
|
||||
private int mDp214;
|
||||
private ObjectAnimator mAnimator;
|
||||
private Animation mAnimation;//礼物数字执行的放大动画
|
||||
@@ -73,6 +74,7 @@ public class LiveGiftViewHolder extends AbsViewHolder {
|
||||
mGiftCount = (TextView) findViewById(R.id.gift_count);
|
||||
mGiftGroupCount = (TextView) findViewById(R.id.gift_group_count);
|
||||
mMulSign = (TextView) findViewById(R.id.mul_sign);
|
||||
giftNamingIcon = (ImageView) findViewById(R.id.gift_naming_icon);
|
||||
mDp214 = DpUtil.dp2px(214);
|
||||
mHandler = new Handler() {
|
||||
@Override
|
||||
@@ -186,7 +188,14 @@ public class LiveGiftViewHolder extends AbsViewHolder {
|
||||
root_back.setBackgroundResource(R.drawable.background_naming);
|
||||
findViewById(R.id.naming_icon).setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_3);
|
||||
if(bean.getUser_naming_status()==1){
|
||||
giftNamingIcon.setVisibility(View.VISIBLE);
|
||||
root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_11);
|
||||
}else{
|
||||
giftNamingIcon.setVisibility(View.GONE);
|
||||
root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_3);
|
||||
}
|
||||
//root_back.setBackgroundResource(R.mipmap.icon_live_gift_anim_3);
|
||||
findViewById(R.id.naming_icon).setVisibility(View.GONE);
|
||||
}
|
||||
if (lian && mGiftCount != null && mAnimation != null) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/gift_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="87dp"
|
||||
@@ -11,7 +13,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -23,7 +24,6 @@
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/gift_name"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -58,6 +58,45 @@
|
||||
android:layout_height="11dp"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="2dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/namingLayout"
|
||||
android:layout_width="70dp"
|
||||
android:background="@mipmap/item_frame_gift_naming_bg"
|
||||
android:layout_height="20dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_marginBottom="27dp"
|
||||
android:layout_gravity="center_horizontal|bottom">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/m_chu_xia"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<com.yunbao.common.views.weight.MarqueeTextView
|
||||
android:id="@+id/naming_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="2dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:gravity="center_vertical"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:clipChildren="false"
|
||||
tools:visibility="visible"
|
||||
android:visibility="invisible">
|
||||
|
||||
<View
|
||||
@@ -45,7 +47,7 @@
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_oval="true" />
|
||||
@@ -119,4 +121,13 @@
|
||||
android:text="@string/the_title_financier2"
|
||||
android:textColor="#DB7008"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:id="@+id/gift_naming_icon"
|
||||
android:src="@mipmap/gift_naming_icon"
|
||||
android:layout_width="27dp"
|
||||
android:layout_height="12dp"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
BIN
live/src/main/res/mipmap-b+en+us/gift_naming_icon.png
Normal file
BIN
live/src/main/res/mipmap-b+en+us/gift_naming_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
BIN
live/src/main/res/mipmap-mdpi/gift_naming_icon.png
Normal file
BIN
live/src/main/res/mipmap-mdpi/gift_naming_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
BIN
live/src/main/res/mipmap-mdpi/icon_live_gift_anim_11.png
Normal file
BIN
live/src/main/res/mipmap-mdpi/icon_live_gift_anim_11.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
BIN
live/src/main/res/mipmap-xhdpi/item_frame_gift_naming_bg.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/item_frame_gift_naming_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user