6.5.4礼物冠名
This commit is contained in:
parent
fa086dc5cb
commit
49810407ce
@ -550,7 +550,7 @@ public class JavascriptInterfaceUtils {
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
@ -1298,5 +1298,6 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="achievement_details">成就詳情</string>
|
||||
<string name="title_anchor">冠名主播:</string>
|
||||
<string name="the_title_financier">冠名金主:</string>
|
||||
<string name="the_title_financier2">冠名</string>
|
||||
|
||||
</resources>
|
||||
|
@ -54,6 +54,87 @@ public class LiveReceiveGiftBean extends BaseModel {
|
||||
private String opentype;
|
||||
private String anchorUid;
|
||||
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();
|
||||
|
||||
public AllServerNotifyEvent getEvent() {
|
||||
|
@ -1031,6 +1031,10 @@ public class SocketRyClient {
|
||||
receiveGiftBean.setAncherName(map.getString("ancherName"));
|
||||
receiveGiftBean.setHot_num(map.getString("hot_num"));
|
||||
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.setmTypeBuyGuard(false);
|
||||
receiveGiftBean.setAllServerNotify(false);
|
||||
|
@ -30,7 +30,7 @@ import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
public class LiveGiftViewHolder extends AbsViewHolder {
|
||||
|
||||
private View mRoot;
|
||||
private View mRoot, root_back;
|
||||
private View mBg;
|
||||
private View mStar;
|
||||
private ImageView mAvatar;
|
||||
@ -62,6 +62,7 @@ public class LiveGiftViewHolder extends AbsViewHolder {
|
||||
@Override
|
||||
public void init() {
|
||||
mRoot = findViewById(R.id.root);
|
||||
root_back = findViewById(R.id.root_back);
|
||||
mBg = findViewById(R.id.bg);
|
||||
mStar = findViewById(R.id.star);
|
||||
mAvatar = (ImageView) findViewById(R.id.avatar);
|
||||
@ -127,7 +128,7 @@ public class LiveGiftViewHolder extends AbsViewHolder {
|
||||
* 显示礼物动画
|
||||
*/
|
||||
public void show(LiveReceiveGiftBean bean, boolean isSameUser) {
|
||||
if (bean.getMark()==3) {//这是幸运礼物
|
||||
if (bean.getMark() == 3) {//这是幸运礼物
|
||||
if (!mIdle) {
|
||||
hideNormal();
|
||||
}
|
||||
@ -177,6 +178,13 @@ public class LiveGiftViewHolder extends AbsViewHolder {
|
||||
mGiftCount.setText(new LiveTextRender().renderGiftCount(mLianCount));
|
||||
}
|
||||
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) {
|
||||
mGiftCount.startAnimation(mAnimation);
|
||||
}
|
||||
|
9
live/src/main/res/drawable/background_naming.xml
Normal file
9
live/src/main/res/drawable/background_naming.xml
Normal 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>
|
9
live/src/main/res/drawable/background_naming_icon.xml
Normal file
9
live/src/main/res/drawable/background_naming_icon.xml
Normal 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>
|
@ -8,6 +8,7 @@
|
||||
android:visibility="invisible">
|
||||
|
||||
<View
|
||||
android:id="@+id/root_back"
|
||||
android:layout_width="204dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="bottom"
|
||||
@ -107,4 +108,15 @@
|
||||
android:visibility="invisible" />
|
||||
</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>
|
||||
|
Loading…
Reference in New Issue
Block a user