贵族开通的动画横幅

This commit is contained in:
18401019693 2022-09-19 15:35:37 +08:00
parent 8b4d25bbeb
commit 0de802bf3c
7 changed files with 124 additions and 11 deletions

View File

@ -51,8 +51,8 @@ public class NobleNoticeView extends FrameLayout {
private SVGAImageView svagaBc;
private RelativeLayout rootLayout;
private long animationTime = 8000;
private TextView gotoRoomView, nobleNickname;
private String mSvgaName;
private TextView gotoRoomView, nobleNickname, userName, anchorNickname;
private String mSvgaName, uhead,anchorUid;
private RoleType roleType;
private HorizontalScrollView contextLayout;
private RelativeLayout scrollLayout;
@ -83,10 +83,20 @@ public class NobleNoticeView extends FrameLayout {
scrollLayout = rootView.findViewById(R.id.scroll_layout);
nobleIcon = rootView.findViewById(R.id.noble_icon);
nobleNickname = rootView.findViewById(R.id.noble_nickname);
userName = rootView.findViewById(R.id.user_name);
anchorNickname = rootView.findViewById(R.id.anchor_nickname);
contextLayout.setVisibility(GONE);
gotoRoomView.setVisibility(GONE);
}
public NobleNoticeView setRootView(String uHead, String userNameStr, String anchorNicknameStr, String anchorUid) {
this.uhead = uHead;
this.anchorUid = anchorUid;
userName.setText(userNameStr);
anchorNickname.setText(anchorNicknameStr);
return this;
}
/**
* 设置展示的类型
*
@ -145,7 +155,7 @@ public class NobleNoticeView extends FrameLayout {
public void subscribe(ObservableEmitter<Bitmap> emitter) throws Exception {
Bitmap bitmap = BitmapUtil.getInstance()
.getBitmap(mContext,
"https://downs.yaoulive.com/20220818/372776fa38774814d601e68fcfc70f35.jpeg?imageView2/2/w/600/h/600",
uhead,
174,
174,
87);

View File

@ -50,8 +50,47 @@ public class LiveReceiveGiftBean {
private String nobilityid;
private String nobilityname;
private String opentype;
private String anchorUid;
public String getAnchorUid() {
return anchorUid;
}
public LiveReceiveGiftBean setAnchorUid(String anchorUid) {
this.anchorUid = anchorUid;
return this;
}
private int sendtype;
private String uhead;
private String uname;
public String getUname() {
return uname;
}
public LiveReceiveGiftBean setUname(String uname) {
this.uname = uname;
return this;
}
public String getUhead() {
return uhead;
}
public LiveReceiveGiftBean setUhead(String uhead) {
this.uhead = uhead;
return this;
}
public LiveChatBean getmLiveChatBean() {
return mLiveChatBean;
}
public LiveReceiveGiftBean setmLiveChatBean(LiveChatBean mLiveChatBean) {
this.mLiveChatBean = mLiveChatBean;
return this;
}
public int getSendtype() {
return sendtype;

View File

@ -382,6 +382,8 @@ public class SocketClient {
receiveGiftBean.setNobilityname(map.getString("nobilityname"));
receiveGiftBean.setOpentype(map.getString("opentype"));
receiveGiftBean.setSendtype(map.getIntValue("action"));
receiveGiftBean.setSendtype(map.getIntValue("uname"));
receiveGiftBean.setSendtype(map.getIntValue("uhead"));
if (map.getString("notice").equals("1")) {
LiveRoomViewHolder.paygzGif(map.getString("special_src"), map.getString("anchorUid"));
}

View File

@ -547,6 +547,9 @@ public class SocketRyClient {
receiveGiftBean.setNobilityname(map.getString("nobilityname"));
receiveGiftBean.setOpentype(map.getString("opentype"));
receiveGiftBean.setSendtype(map.getIntValue("action"));
receiveGiftBean.setSendtype(map.getIntValue("action"));
receiveGiftBean.setUname(map.getString("uname"));
receiveGiftBean.setUhead(map.getString("uhead"));
if (map.getString("notice").equals("1")) {
LiveRoomViewHolder.paygzGif(map.getString("special_src"), map.getString("anchorUid"));
}

View File

@ -81,6 +81,7 @@ import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.utils.formatBigNum;
import com.yunbao.common.views.AbsViewHolder;
import com.yunbao.common.views.weight.FullServiceNotificationView;
import com.yunbao.common.views.weight.NobleNoticeView;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
@ -289,6 +290,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
private TextView msgNumber;//悬浮窗左上角数标
private RoundedImageView msgUserIcon; //悬浮窗icon
private FullServiceNotificationView fullScreen;//全副喇叭
private NobleNoticeView noble;//全副喇叭
public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) {
super(context, parentView);
@ -613,6 +615,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
EventBus.getDefault().register(this);
btnEvent = findViewById(R.id.btn_event);
fullScreen = (FullServiceNotificationView) findViewById(R.id.full_screen);
noble = (NobleNoticeView) findViewById(R.id.noble);
btnEvent3 = findViewById(R.id.btn_event3);
imgEvent = (ImageView) findViewById(R.id.img_event);
btn_event2 = (LinearLayout) findViewById(R.id.btn_event2);
@ -952,12 +955,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
findViewById(R.id.wish_list_layout).setEnabled(false);*/
findViewById(R.id.open_sidebar).setVisibility(View.GONE);
findViewById(R.id.btn_follow).setVisibility(View.GONE);
}else {
} else {
configBanner3();
}
reloadIM();
}
public void hideFloatMsg(){
public void hideFloatMsg() {
msg.setVisibility(View.GONE);
}
@ -1741,7 +1745,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* @param in 展示的view
*/
private void changeMsgView(View out, View in) {
if(mContext instanceof LiveRyAnchorActivity){
if (mContext instanceof LiveRyAnchorActivity) {
return;
}
if (in.getVisibility() == View.VISIBLE) {
@ -2255,6 +2259,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
/**
* 开通贵族的全服通知
*
* @param bean
*/
public void showBuyVipMessage(LiveReceiveGiftBean bean) {
@ -2262,6 +2267,58 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
// mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
// }
// mLiveGiftAnimPresenter.showBuyVipGiftAnim(bean);
switch (bean.getNobilityid()) {
case "1":
noble.setRootView(bean.getUhead(),
bean.getUname(),
bean.getAncherName(),
bean.getAnchorUid())
.setRoleType(NobleNoticeView.RoleType.BARON);
break;
case "2":
noble.setRootView(bean.getUhead(),
bean.getUname(),
bean.getAncherName(),
bean.getAnchorUid())
.setRoleType(NobleNoticeView.RoleType.VISCOUNT);
break;
case "3":
noble.setRootView(bean.getUhead(),
bean.getUname(),
bean.getAncherName(),
bean.getAnchorUid())
.setRoleType(NobleNoticeView.RoleType.MARQUIS);
break;
case "4":
noble.setRootView(bean.getUhead(),
bean.getUname(),
bean.getAncherName(),
bean.getAnchorUid())
.setRoleType(NobleNoticeView.RoleType.DUKE);
break;
case "5":
noble.setRootView(bean.getUhead(),
bean.getUname(),
bean.getAncherName(),
bean.getAnchorUid())
.setRoleType(NobleNoticeView.RoleType.KING);
break;
case "6":
noble.setRootView(bean.getUhead(),
bean.getUname(),
bean.getAncherName(),
bean.getAnchorUid())
.setRoleType(NobleNoticeView.RoleType.EMPEROR);
break;
case "7":
noble.setRootView(bean.getUhead(),
bean.getUname(),
bean.getAncherName(),
bean.getAnchorUid())
.setRoleType(NobleNoticeView.RoleType.BETTER_EMPEROR);
break;
}
}
public void showSysMessage(LiveReceiveGiftBean bean) {

View File

@ -2085,4 +2085,11 @@
android:layout_height="wrap_content"
android:layout_below="@id/live_video" />
<com.yunbao.common.views.weight.NobleNoticeView
android:id="@+id/noble"
android:layout_below="@id/live_wks_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
</RelativeLayout>

View File

@ -241,9 +241,4 @@
android:layout_marginTop="80dp"
android:src="@mipmap/white_logo" />
<com.yunbao.common.views.weight.NobleNoticeView
android:id="@+id/noble"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="200dp" />
</RelativeLayout>