6.5.4礼物冠名

This commit is contained in:
18401019693 2023-08-04 09:47:42 +08:00
parent fa086dc5cb
commit 49810407ce
8 changed files with 127 additions and 3 deletions

View File

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

View File

@ -1298,5 +1298,6 @@ Limited ride And limited avatar frame</string>
<string name="achievement_details">成就詳情</string> <string name="achievement_details">成就詳情</string>
<string name="title_anchor">冠名主播:</string> <string name="title_anchor">冠名主播:</string>
<string name="the_title_financier">冠名金主:</string> <string name="the_title_financier">冠名金主:</string>
<string name="the_title_financier2">冠名</string>
</resources> </resources>

View File

@ -54,6 +54,87 @@ public class LiveReceiveGiftBean extends BaseModel {
private String opentype; private String opentype;
private String anchorUid; private String anchorUid;
private boolean isBlindBox = false; private boolean isBlindBox = false;
private String namingLiveuid;
private String namingUid;
private String namingLiveName;
private String namingUserName;
private String namingLiveAvatar;
private String namingUserAvatar;
private String namingStatus;
private String namingCoin;
public String getNamingLiveuid() {
return namingLiveuid;
}
public LiveReceiveGiftBean setNamingLiveuid(String namingLiveuid) {
this.namingLiveuid = namingLiveuid;
return this;
}
public String getNamingUid() {
return namingUid;
}
public LiveReceiveGiftBean setNamingUid(String namingUid) {
this.namingUid = namingUid;
return this;
}
public String getNamingLiveName() {
return namingLiveName;
}
public LiveReceiveGiftBean setNamingLiveName(String namingLiveName) {
this.namingLiveName = namingLiveName;
return this;
}
public String getNamingUserName() {
return namingUserName;
}
public LiveReceiveGiftBean setNamingUserName(String namingUserName) {
this.namingUserName = namingUserName;
return this;
}
public String getNamingLiveAvatar() {
return namingLiveAvatar;
}
public LiveReceiveGiftBean setNamingLiveAvatar(String namingLiveAvatar) {
this.namingLiveAvatar = namingLiveAvatar;
return this;
}
public String getNamingUserAvatar() {
return namingUserAvatar;
}
public LiveReceiveGiftBean setNamingUserAvatar(String namingUserAvatar) {
this.namingUserAvatar = namingUserAvatar;
return this;
}
public String getNamingStatus() {
return namingStatus;
}
public LiveReceiveGiftBean setNamingStatus(String namingStatus) {
this.namingStatus = namingStatus;
return this;
}
public String getNamingCoin() {
return namingCoin;
}
public LiveReceiveGiftBean setNamingCoin(String namingCoin) {
this.namingCoin = namingCoin;
return this;
}
private AllServerNotifyEvent event = new AllServerNotifyEvent(); private AllServerNotifyEvent event = new AllServerNotifyEvent();
public AllServerNotifyEvent getEvent() { public AllServerNotifyEvent getEvent() {

View File

@ -1031,6 +1031,10 @@ public class SocketRyClient {
receiveGiftBean.setAncherName(map.getString("ancherName")); receiveGiftBean.setAncherName(map.getString("ancherName"));
receiveGiftBean.setHot_num(map.getString("hot_num")); receiveGiftBean.setHot_num(map.getString("hot_num"));
receiveGiftBean.setDrpk_status(map.getString("drpk_status")); receiveGiftBean.setDrpk_status(map.getString("drpk_status"));
receiveGiftBean.setNamingCoin(map.getString("naming_live_name"));
receiveGiftBean.setNamingLiveName(map.getString("naming_live_name"));
receiveGiftBean.setNamingUid(map.getString("naming_uid"));
receiveGiftBean.setNamingLiveuid(map.getString("naming_liveuid"));
receiveGiftBean.setmLiveUId(mLiveUid); receiveGiftBean.setmLiveUId(mLiveUid);
receiveGiftBean.setmTypeBuyGuard(false); receiveGiftBean.setmTypeBuyGuard(false);
receiveGiftBean.setAllServerNotify(false); receiveGiftBean.setAllServerNotify(false);

View File

@ -30,7 +30,7 @@ import com.yunbao.live.utils.LiveTextRender;
public class LiveGiftViewHolder extends AbsViewHolder { public class LiveGiftViewHolder extends AbsViewHolder {
private View mRoot; private View mRoot, root_back;
private View mBg; private View mBg;
private View mStar; private View mStar;
private ImageView mAvatar; private ImageView mAvatar;
@ -62,6 +62,7 @@ public class LiveGiftViewHolder extends AbsViewHolder {
@Override @Override
public void init() { public void init() {
mRoot = findViewById(R.id.root); mRoot = findViewById(R.id.root);
root_back = findViewById(R.id.root_back);
mBg = findViewById(R.id.bg); mBg = findViewById(R.id.bg);
mStar = findViewById(R.id.star); mStar = findViewById(R.id.star);
mAvatar = (ImageView) findViewById(R.id.avatar); mAvatar = (ImageView) findViewById(R.id.avatar);
@ -177,6 +178,13 @@ public class LiveGiftViewHolder extends AbsViewHolder {
mGiftCount.setText(new LiveTextRender().renderGiftCount(mLianCount)); mGiftCount.setText(new LiveTextRender().renderGiftCount(mLianCount));
} }
mLastGiftKey = bean.getKey(); mLastGiftKey = bean.getKey();
if (!TextUtils.equals(bean.getNamingLiveuid(), "0") && !TextUtils.equals(bean.getNamingUid(), "0")) {
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);
findViewById(R.id.naming_icon).setVisibility(View.GONE);
}
if (lian && mGiftCount != null && mAnimation != null) { if (lian && mGiftCount != null && mAnimation != null) {
mGiftCount.startAnimation(mAnimation); mGiftCount.startAnimation(mAnimation);
} }

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:radius="25dp" />
<gradient android:endColor="#EC9BFF" android:startColor="#BA68FF" />
</shape>
</item>
</selector>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="25dp" android:topRightRadius="25dp" />
<solid android:color="#F7D80B" />
</shape>
</item>
</selector>

View File

@ -8,6 +8,7 @@
android:visibility="invisible"> android:visibility="invisible">
<View <View
android:id="@+id/root_back"
android:layout_width="204dp" android:layout_width="204dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_gravity="bottom" android:layout_gravity="bottom"
@ -107,4 +108,15 @@
android:visibility="invisible" /> android:visibility="invisible" />
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/naming_icon"
android:layout_width="56dp"
android:layout_height="15dp"
android:layout_gravity="bottom"
android:layout_marginStart="11dp"
android:background="@drawable/background_naming_icon"
android:gravity="center"
android:text="@string/the_title_financier2"
android:textColor="#DB7008"
android:textSize="10sp" />
</FrameLayout> </FrameLayout>