直播间开通贵族结束
This commit is contained in:
parent
1935ac14f0
commit
86735ab81f
@ -3,6 +3,7 @@ package com.yunbao.common.views.weight;
|
|||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -51,8 +52,8 @@ public class NobleNoticeView extends FrameLayout {
|
|||||||
private SVGAImageView svagaBc;
|
private SVGAImageView svagaBc;
|
||||||
private RelativeLayout rootLayout;
|
private RelativeLayout rootLayout;
|
||||||
private long animationTime = 8000;
|
private long animationTime = 8000;
|
||||||
private TextView gotoRoomView, nobleNickname, userName, anchorNickname;
|
private TextView gotoRoomView, nobleNickname, userName, anchorNickname, openNoble;
|
||||||
private String mSvgaName, uhead, anchorUid;
|
private String mSvgaName, uhead, anchorNicknameStr;
|
||||||
private RoleType roleType;
|
private RoleType roleType;
|
||||||
private HorizontalScrollView contextLayout;
|
private HorizontalScrollView contextLayout;
|
||||||
private RelativeLayout scrollLayout;
|
private RelativeLayout scrollLayout;
|
||||||
@ -83,6 +84,7 @@ public class NobleNoticeView extends FrameLayout {
|
|||||||
scrollLayout = rootView.findViewById(R.id.scroll_layout);
|
scrollLayout = rootView.findViewById(R.id.scroll_layout);
|
||||||
nobleIcon = rootView.findViewById(R.id.noble_icon);
|
nobleIcon = rootView.findViewById(R.id.noble_icon);
|
||||||
nobleNickname = rootView.findViewById(R.id.noble_nickname);
|
nobleNickname = rootView.findViewById(R.id.noble_nickname);
|
||||||
|
openNoble = rootView.findViewById(R.id.open_noble);
|
||||||
userName = rootView.findViewById(R.id.user_name);
|
userName = rootView.findViewById(R.id.user_name);
|
||||||
anchorNickname = rootView.findViewById(R.id.anchor_nickname);
|
anchorNickname = rootView.findViewById(R.id.anchor_nickname);
|
||||||
contextLayout.setVisibility(GONE);
|
contextLayout.setVisibility(GONE);
|
||||||
@ -99,9 +101,20 @@ public class NobleNoticeView extends FrameLayout {
|
|||||||
|
|
||||||
public NobleNoticeView setRootView(String uHead, String userNameStr, String anchorNicknameStr, String anchorUid) {
|
public NobleNoticeView setRootView(String uHead, String userNameStr, String anchorNicknameStr, String anchorUid) {
|
||||||
this.uhead = uHead;
|
this.uhead = uHead;
|
||||||
this.anchorUid = anchorUid;
|
this.anchorNicknameStr = anchorNicknameStr.trim();
|
||||||
userName.setText(userNameStr);
|
userName.setText(userNameStr);
|
||||||
anchorNickname.setText(anchorNicknameStr);
|
anchorNickname.setText(anchorNicknameStr.trim());
|
||||||
|
if (TextUtils.isEmpty(anchorNicknameStr.trim())) {
|
||||||
|
gotoRoomView.setVisibility(GONE);
|
||||||
|
findViewById(R.id.in).setVisibility(GONE);
|
||||||
|
findViewById(R.id.anchor_nickname).setVisibility(GONE);
|
||||||
|
openNoble.setText(mContext.getString(R.string.open_noble2));
|
||||||
|
}else {
|
||||||
|
gotoRoomView.setVisibility(VISIBLE);
|
||||||
|
findViewById(R.id.in).setVisibility(VISIBLE);
|
||||||
|
findViewById(R.id.anchor_nickname).setVisibility(VISIBLE);
|
||||||
|
openNoble.setText(mContext.getString(R.string.open_noble));
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,8 +361,13 @@ public class NobleNoticeView extends FrameLayout {
|
|||||||
}
|
}
|
||||||
gotoRoomView.setLayoutParams(layoutParams);
|
gotoRoomView.setLayoutParams(layoutParams);
|
||||||
contextLayout.setLayoutParams(contextLayoutParams);
|
contextLayout.setLayoutParams(contextLayoutParams);
|
||||||
|
if (!TextUtils.isEmpty(anchorNicknameStr)) {
|
||||||
|
gotoRoomView.setVisibility(VISIBLE);
|
||||||
|
findViewById(R.id.in).setVisibility(VISIBLE);
|
||||||
|
findViewById(R.id.anchor_nickname).setVisibility(VISIBLE);
|
||||||
|
}
|
||||||
contextLayout.setVisibility(VISIBLE);
|
contextLayout.setVisibility(VISIBLE);
|
||||||
gotoRoomView.setVisibility(VISIBLE);
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -50,45 +50,50 @@
|
|||||||
android:textColor="#F7FF74"
|
android:textColor="#F7FF74"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/in"
|
android:id="@+id/live_layout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginStart="7.5dp"
|
|
||||||
android:layout_toEndOf="@id/user_name"
|
android:layout_toEndOf="@id/user_name"
|
||||||
android:text="@string/in"
|
android:visibility="visible">
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/anchor_nickname"
|
android:id="@+id/in"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_marginStart="7.5dp"
|
||||||
android:layout_marginStart="6.5dp"
|
|
||||||
android:layout_toEndOf="@id/in"
|
android:text="@string/in"
|
||||||
android:text="主播昵称"
|
android:textColor="@color/white"
|
||||||
android:textColor="#F7FF74"
|
android:textSize="14sp" />
|
||||||
android:textSize="14sp" />
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/anchor_nickname"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
|
||||||
|
android:layout_marginStart="6.5dp"
|
||||||
|
android:textColor="#F7FF74"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/open_noble"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4.5dp"
|
||||||
|
android:text="@string/open_noble"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/open_noble"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginStart="4.5dp"
|
|
||||||
android:layout_toEndOf="@id/anchor_nickname"
|
|
||||||
android:text="@string/open_noble"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/noble_icon"
|
android:id="@+id/noble_icon"
|
||||||
android:layout_width="25dp"
|
android:layout_width="25dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginStart="4.5dp"
|
android:layout_marginStart="4.5dp"
|
||||||
android:layout_toEndOf="@id/open_noble"
|
android:layout_toEndOf="@id/live_layout"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@mipmap/icon_open_chaohuang" />
|
android:src="@mipmap/icon_open_chaohuang" />
|
||||||
|
|
||||||
|
@ -907,5 +907,6 @@
|
|||||||
<string name="better_emperor_hint">昭告天下! %s 向所有人推薦了主播 %s , 一眼萬年情之所鐘!</string>
|
<string name="better_emperor_hint">昭告天下! %s 向所有人推薦了主播 %s , 一眼萬年情之所鐘!</string>
|
||||||
<string name="emperor_hint">昭告天下! %s 向所有人推薦了主播 %s , 灼灼風華一瞥驚鴻!</string>
|
<string name="emperor_hint">昭告天下! %s 向所有人推薦了主播 %s , 灼灼風華一瞥驚鴻!</string>
|
||||||
<string name="try_again_later">數據加載失敗,請稍後再試</string>
|
<string name="try_again_later">數據加載失敗,請稍後再試</string>
|
||||||
|
<string name="open_noble2">開通了</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -2273,7 +2273,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getRoomnum())
|
||||||
.setRoleType(NobleNoticeView.RoleType.BARON)
|
.setRoleType(NobleNoticeView.RoleType.BARON)
|
||||||
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
@ -2281,7 +2281,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getRoomnum())
|
||||||
.setRoleType(NobleNoticeView.RoleType.VISCOUNT)
|
.setRoleType(NobleNoticeView.RoleType.VISCOUNT)
|
||||||
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
@ -2289,7 +2289,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getRoomnum())
|
||||||
.setRoleType(NobleNoticeView.RoleType.MARQUIS)
|
.setRoleType(NobleNoticeView.RoleType.MARQUIS)
|
||||||
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
@ -2297,7 +2297,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getRoomnum())
|
||||||
.setRoleType(NobleNoticeView.RoleType.DUKE)
|
.setRoleType(NobleNoticeView.RoleType.DUKE)
|
||||||
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
@ -2305,7 +2305,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getRoomnum())
|
||||||
.setRoleType(NobleNoticeView.RoleType.KING)
|
.setRoleType(NobleNoticeView.RoleType.KING)
|
||||||
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
@ -2313,7 +2313,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getRoomnum())
|
||||||
.setRoleType(NobleNoticeView.RoleType.EMPEROR)
|
.setRoleType(NobleNoticeView.RoleType.EMPEROR)
|
||||||
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
@ -2321,7 +2321,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
noble.setRootView(bean.getUhead(),
|
noble.setRootView(bean.getUhead(),
|
||||||
bean.getUname(),
|
bean.getUname(),
|
||||||
bean.getAncherName(),
|
bean.getAncherName(),
|
||||||
bean.getAnchorUid())
|
bean.getRoomnum())
|
||||||
.setRoleType(NobleNoticeView.RoleType.BETTER_EMPEROR)
|
.setRoleType(NobleNoticeView.RoleType.BETTER_EMPEROR)
|
||||||
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
.setCallBack(() -> gotoLive(bean.getRoomnum()));
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user