贵族开通全服通知

This commit is contained in:
18401019693 2022-11-23 13:42:55 +08:00
parent 0d219e4b6d
commit 011322dd8e
12 changed files with 22 additions and 25 deletions

View File

@ -80,7 +80,7 @@ public class NobleNoticeView extends FrameLayout {
rootView = LayoutInflater.from(mContext).inflate(R.layout.view_noble_notice, this, true); rootView = LayoutInflater.from(mContext).inflate(R.layout.view_noble_notice, this, true);
svagaBc = rootView.findViewById(R.id.svaga_bc); svagaBc = rootView.findViewById(R.id.svaga_bc);
rootLayout = rootView.findViewById(R.id.root_layout); rootLayout = rootView.findViewById(R.id.root_layout);
gotoRoomView = rootView.findViewById(R.id.goto_room_view); gotoRoomView = rootView.findViewById(R.id.got_room_view);
contextLayout = rootView.findViewById(R.id.context_layout); contextLayout = rootView.findViewById(R.id.context_layout);
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);
@ -111,7 +111,6 @@ public class NobleNoticeView extends FrameLayout {
findViewById(R.id.anchor_nickname).setVisibility(GONE); findViewById(R.id.anchor_nickname).setVisibility(GONE);
openNoble.setText(mContext.getString(R.string.open_noble2)); openNoble.setText(mContext.getString(R.string.open_noble2));
}else { }else {
gotoRoomView.setVisibility(VISIBLE);
findViewById(R.id.in).setVisibility(VISIBLE); findViewById(R.id.in).setVisibility(VISIBLE);
findViewById(R.id.anchor_nickname).setVisibility(VISIBLE); findViewById(R.id.anchor_nickname).setVisibility(VISIBLE);
openNoble.setText(mContext.getString(R.string.open_noble)); openNoble.setText(mContext.getString(R.string.open_noble));
@ -254,7 +253,7 @@ public class NobleNoticeView extends FrameLayout {
@Override @Override
public void onStep(int frame, double v) { public void onStep(int frame, double v) {
System.out.println("frame = " + frame); System.out.println("frame = " + frame);
if (frame == 10) { if (frame == 20) {
setButtonPosition(roleType); setButtonPosition(roleType);
observable.observeOn(AndroidSchedulers.mainThread()) observable.observeOn(AndroidSchedulers.mainThread())
.subscribe(bitmap -> { .subscribe(bitmap -> {
@ -270,7 +269,7 @@ public class NobleNoticeView extends FrameLayout {
}).isDisposed(); }).isDisposed();
} }
if (frame == 150) { if (frame == 135) {
contextLayout.setVisibility(GONE); contextLayout.setVisibility(GONE);
gotoRoomView.setVisibility(GONE); gotoRoomView.setVisibility(GONE);
scrollLayout.clearAnimation(); scrollLayout.clearAnimation();

View File

@ -12,7 +12,7 @@
<TextView <TextView
android:id="@+id/goto_room_view" android:id="@+id/got_room_view"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
@ -33,7 +33,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="42dp" android:layout_marginTop="42dp"
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:layout_toStartOf="@id/goto_room_view" android:layout_toStartOf="@id/got_room_view"
android:scrollbars="none"> android:scrollbars="none">
<RelativeLayout <RelativeLayout

View File

@ -10,9 +10,9 @@ ext {
manifestPlaceholders = [ manifestPlaceholders = [
// //
serverHost : "https://napi.yaoulive.com", // serverHost : "https://napi.yaoulive.com",
// //
// serverHost : "https://ceshi.yaoulive.com", serverHost : "https://ceshi.yaoulive.com",
// //
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",

View File

@ -230,28 +230,28 @@ public class LiveTextRender {
int index = 0; int index = 0;
if (levelDrawable != null) { if (levelDrawable != null) {
builder.append(" "); builder.append(" ");
levelDrawable.setBounds(0, 0, DpUtil.dp2px(32), DpUtil.dp2px(14)); levelDrawable.setBounds(0, 0, DpUtil.dp2px(32), DpUtil.dp2px(14));
builder.setSpan(new VerticalImageSpan(levelDrawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan(new VerticalImageSpan(levelDrawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
index = builder.length(); index = builder.length();
} }
if (gzDrawablesMap.containsKey(bean)) {//贵族 if (gzDrawablesMap.containsKey(bean)) {//贵族
builder.append(" "); builder.append(" ");
gzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(32), DpUtil.dp2px(18)); gzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(32), DpUtil.dp2px(18));
builder.setSpan(new VerticalImageSpan(gzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan(new VerticalImageSpan(gzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
index = builder.length(); index = builder.length();
} }
if (ryxzDrawablesMap.containsKey(bean)) {//荣誉勋章 if (ryxzDrawablesMap.containsKey(bean)) {//荣誉勋章
builder.append(" "); builder.append(" ");
ryxzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(18)); ryxzDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(18));
builder.setSpan(new VerticalImageSpan(ryxzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan(new VerticalImageSpan(ryxzDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
index = builder.length(); index = builder.length();
} }
if (nhDrawablesMap.containsKey(bean)) {//靓号 if (nhDrawablesMap.containsKey(bean)) {//靓号
builder.append(" "); builder.append(" ");
nhDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17)); nhDrawablesMap.get(bean).setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(17));
builder.setSpan(new VerticalImageSpan(nhDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan(new VerticalImageSpan(nhDrawablesMap.get(bean)), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
index = builder.length(); index = builder.length();
@ -268,7 +268,7 @@ public class LiveTextRender {
} }
if (drawable != null) { if (drawable != null) {
builder.append(" "); builder.append(" ");
drawable.setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(16)); drawable.setBounds(0, 0, DpUtil.dp2px(18), DpUtil.dp2px(16));
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
index = builder.length(); index = builder.length();
@ -280,7 +280,7 @@ public class LiveTextRender {
&& !bean.getMedalNmae().equals("null") && !bean.getMedalNmae().equals("(null)") && !bean.getMedalNmae().equals("<null>")) {//粉丝徽章图标 && !bean.getMedalNmae().equals("null") && !bean.getMedalNmae().equals("(null)") && !bean.getMedalNmae().equals("<null>")) {//粉丝徽章图标
Drawable drawable = getMedalImage(bean); Drawable drawable = getMedalImage(bean);
if (drawable != null) { if (drawable != null) {
builder.append(" "); builder.append(" ");
drawable.setBounds(0, 0, DpUtil.dp2px(44), DpUtil.dp2px(17)); drawable.setBounds(0, 0, DpUtil.dp2px(44), DpUtil.dp2px(17));
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
index = builder.length(); index = builder.length();
@ -291,7 +291,7 @@ public class LiveTextRender {
if (bean.isManager()) {//直播间管理员图标 if (bean.isManager()) {//直播间管理员图标
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_m); Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_m);
if (drawable != null) { if (drawable != null) {
builder.append(" "); builder.append(" ");
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14)); drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
index = builder.length(); index = builder.length();
@ -301,7 +301,7 @@ public class LiveTextRender {
if (!TextUtils.isEmpty(bean.getLiangName())) {//靓号图标 if (!TextUtils.isEmpty(bean.getLiangName())) {//靓号图标
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_liang); Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_liang);
if (drawable != null) { if (drawable != null) {
builder.append(" "); builder.append(" ");
drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14)); drawable.setBounds(0, 0, DpUtil.dp2px(17), DpUtil.dp2px(14));
builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan(new VerticalImageSpan(drawable), index, index + 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
// new add // new add
@ -528,9 +528,9 @@ public class LiveTextRender {
int indexX = 80; int indexX = 80;
//水印的位置坐标 //水印的位置坐标
if (level.length() > 2) { if (level.length() > 2) {
indexX = 75; indexX = 87;
} else { } else {
indexX = 84; indexX = 95;
} }
mCanvas.drawText(level, indexX, 53, mPaint); mCanvas.drawText(level, indexX, 53, mPaint);
mCanvas.save(); mCanvas.save();

View File

@ -9,6 +9,11 @@
android:paddingTop="15dp"> android:paddingTop="15dp">
<com.yunbao.common.views.weight.NobleNoticeView
android:id="@+id/noble"
android:layout_width="match_parent"
android:layout_marginTop="60dp"
android:layout_height="wrap_content" />
<LinearLayout <LinearLayout
android:id="@+id/lin" android:id="@+id/lin"
@ -2089,13 +2094,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/live_video" /> android:layout_below="@id/live_video" />
<com.yunbao.common.views.weight.NobleNoticeView
android:id="@+id/noble"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/live_wks_layout"
android:layout_marginTop="10dp" />
<LinearLayout <LinearLayout
android:id="@+id/bannerLayout" android:id="@+id/bannerLayout"