铭牌fix
This commit is contained in:
@@ -181,7 +181,7 @@ public class OnlineUserAdapter extends BaseMultiItemQuickAdapter<OnlineChatMembe
|
|||||||
|
|
||||||
ImageView ivOfficialMask = inOfficialMask.findViewById(R.id.iv_official_mask);
|
ImageView ivOfficialMask = inOfficialMask.findViewById(R.id.iv_official_mask);
|
||||||
if (ivOfficialMask != null) {
|
if (ivOfficialMask != null) {
|
||||||
NobleUtil.loadResource(iconPic, ivOfficialMask);
|
ImageLoadUtils.loadImage(mContext, iconPic, ivOfficialMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@@ -1563,15 +1563,14 @@ public class MessageView extends FrameLayout {
|
|||||||
// 官方主播认证
|
// 官方主播认证
|
||||||
String tvOfficialMask = NobleUtil.getLevel(UserInfo.OAC_NAME, chatRoomMessage);
|
String tvOfficialMask = NobleUtil.getLevel(UserInfo.OAC_NAME, chatRoomMessage);
|
||||||
String ivOfficialMask = NobleUtil.getLevel(UserInfo.OAC_ICON, chatRoomMessage);
|
String ivOfficialMask = NobleUtil.getLevel(UserInfo.OAC_ICON, chatRoomMessage);
|
||||||
if (!TextUtils.isEmpty(tvOfficialMask) && !TextUtils.isEmpty(ivOfficialMask) && extension != null) { // extension != null 表示自己
|
if (!TextUtils.isEmpty(tvOfficialMask) && !TextUtils.isEmpty(ivOfficialMask)) { // extension != null 表示自己
|
||||||
text.appendBgAndContent(ivOfficialMask, tvOfficialMask, SizeUtils.dp2px(tvContent.getContext(), 59),
|
text.appendBgAndContent(ivOfficialMask, tvOfficialMask, SizeUtils.dp2px(tvContent.getContext(), 62),
|
||||||
SizeUtils.dp2px(tvContent.getContext(), 15));
|
SizeUtils.dp2px(tvContent.getContext(), 15));
|
||||||
}
|
}
|
||||||
|
|
||||||
text.append(userLevel, expLevelWidth, expLevelHeight)
|
text.append(userLevel, expLevelWidth, expLevelHeight)
|
||||||
.append(extension == null ? "我" : RegexUtil.getPrintableString(extension.getSenderNick()), new ForegroundColorSpan(greyColor))
|
.append(extension == null ? "我" : RegexUtil.getPrintableString(extension.getSenderNick()), new ForegroundColorSpan(greyColor))
|
||||||
.append(":" + chatRoomMessage.getContent(), new ForegroundColorSpan(getResources().getColor(R.color.white)))
|
.append(":" + chatRoomMessage.getContent(), new ForegroundColorSpan(getResources().getColor(R.color.white)));
|
||||||
;
|
|
||||||
|
|
||||||
tvContent.setText(text.build());
|
tvContent.setText(text.build());
|
||||||
}
|
}
|
||||||
@@ -2156,7 +2155,7 @@ public class MessageView extends FrameLayout {
|
|||||||
String tvOfficialMask = NobleUtil.getLevel(UserInfo.OAC_NAME, chatRoomMessage);
|
String tvOfficialMask = NobleUtil.getLevel(UserInfo.OAC_NAME, chatRoomMessage);
|
||||||
String ivOfficialMask = NobleUtil.getLevel(UserInfo.OAC_ICON, chatRoomMessage);
|
String ivOfficialMask = NobleUtil.getLevel(UserInfo.OAC_ICON, chatRoomMessage);
|
||||||
if (!TextUtils.isEmpty(tvOfficialMask) && !TextUtils.isEmpty(ivOfficialMask) && extension != null) { // extension != null 表示自己
|
if (!TextUtils.isEmpty(tvOfficialMask) && !TextUtils.isEmpty(ivOfficialMask) && extension != null) { // extension != null 表示自己
|
||||||
text.appendBgAndContent(ivOfficialMask, tvOfficialMask, SizeUtils.dp2px(tvContent.getContext(), 59),
|
text.appendBgAndContent(ivOfficialMask, tvOfficialMask, SizeUtils.dp2px(tvContent.getContext(), 62),
|
||||||
SizeUtils.dp2px(tvContent.getContext(), 15));
|
SizeUtils.dp2px(tvContent.getContext(), 15));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -123,7 +123,6 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
|||||||
private AppCompatImageView ivNewUser;
|
private AppCompatImageView ivNewUser;
|
||||||
private AppCompatImageView mIvGoodNumber;
|
private AppCompatImageView mIvGoodNumber;
|
||||||
private AppCompatImageView mIvUserLevel;
|
private AppCompatImageView mIvUserLevel;
|
||||||
private AppCompatImageView mIvUserNameplate;
|
|
||||||
private AppCompatImageView mIvUserCharm;
|
private AppCompatImageView mIvUserCharm;
|
||||||
private LinearLayout llFamily;
|
private LinearLayout llFamily;
|
||||||
private TextView tvFamilyNameLabel;
|
private TextView tvFamilyNameLabel;
|
||||||
@@ -196,7 +195,6 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
|||||||
mIvGoodNumber = findViewById(R.id.iv_good_number);
|
mIvGoodNumber = findViewById(R.id.iv_good_number);
|
||||||
mIvUserLevel = findViewById(R.id.iv_user_level);
|
mIvUserLevel = findViewById(R.id.iv_user_level);
|
||||||
mIvUserCharm = findViewById(R.id.iv_user_charm);
|
mIvUserCharm = findViewById(R.id.iv_user_charm);
|
||||||
mIvUserNameplate = findViewById(R.id.iv_user_nameplate);
|
|
||||||
|
|
||||||
llFamily = (LinearLayout) findViewById(R.id.ll_family);
|
llFamily = (LinearLayout) findViewById(R.id.ll_family);
|
||||||
tvFamilyNameLabel = (TextView) findViewById(R.id.tv_family_name_label);
|
tvFamilyNameLabel = (TextView) findViewById(R.id.tv_family_name_label);
|
||||||
@@ -473,16 +471,11 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
|||||||
ImageLoadUtils.loadImage(context, userLevelVo.getCharmUrl(), mIvUserCharm);
|
ImageLoadUtils.loadImage(context, userLevelVo.getCharmUrl(), mIvUserCharm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!TextUtils.isEmpty(userInfo.getNameplatePic())){
|
|
||||||
mIvUserNameplate.setVisibility(View.VISIBLE);
|
|
||||||
ImageLoadUtils.loadImage(context, userInfo.getNameplatePic(), mIvUserNameplate);
|
|
||||||
}
|
|
||||||
// 改变贵族
|
// 改变贵族
|
||||||
updateNobleView();
|
updateNobleView();
|
||||||
|
|
||||||
UserInfo.NamePlate namePlate = userInfo.getNameplate();
|
if (!TextUtils.isEmpty(userInfo.getNameplateWord()) && !TextUtils.isEmpty(userInfo.getNameplatePic())) {
|
||||||
if (namePlate != null) {
|
setOfficialMask(userInfo.getNameplateWord(), userInfo.getNameplatePic());
|
||||||
setOfficialMask(namePlate.getFixedWord(), namePlate.getIconPic());
|
|
||||||
} else {
|
} else {
|
||||||
setOfficialMask(null, null);
|
setOfficialMask(null, null);
|
||||||
}
|
}
|
||||||
@@ -548,7 +541,7 @@ public class UserInfoDialog extends AppCompatDialog implements View.OnClickListe
|
|||||||
ImageView ivOfficialMask;
|
ImageView ivOfficialMask;
|
||||||
ivOfficialMask = inOfficialMask.findViewById(R.id.iv_official_mask);
|
ivOfficialMask = inOfficialMask.findViewById(R.id.iv_official_mask);
|
||||||
if (ivOfficialMask != null) {
|
if (ivOfficialMask != null) {
|
||||||
NobleUtil.loadResource(icon, ivOfficialMask);
|
ImageLoadUtils.loadImage(context, userInfo.getNameplatePic(), ivOfficialMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@@ -119,14 +119,7 @@
|
|||||||
tools:src="@mipmap/ic_user_level_king"
|
tools:src="@mipmap/ic_user_level_king"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/in_official_mask"
|
|
||||||
layout="@layout/layout_official_mask"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/dp_15"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginEnd="5.5dp"
|
|
||||||
android:visibility="visible" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_user_level"
|
android:id="@+id/iv_user_level"
|
||||||
@@ -152,14 +145,32 @@
|
|||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_user_nameplate"
|
android:id="@+id/iv_user_nameplate"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/dp_3"
|
||||||
android:layout_height="@dimen/dp_15"
|
android:layout_height="@dimen/dp_15"
|
||||||
android:layout_marginEnd="3dp"
|
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:src="@mipmap/ic_user_level"
|
tools:src="@mipmap/ic_user_level"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_15"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
>
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/in_official_mask"
|
||||||
|
layout="@layout/layout_official_mask"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:minWidth="59dp"
|
android:minWidth="62dp"
|
||||||
tools:src="@drawable/ic_temp_official_mask"
|
tools:src="@drawable/ic_temp_official_mask"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@@ -24,11 +24,12 @@
|
|||||||
android:id="@+id/tv_official_mask"
|
android:id="@+id/tv_official_mask"
|
||||||
android:layout_width="38.5dp"
|
android:layout_width="38.5dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="5.5dp"
|
android:layout_marginEnd="4.5dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="8dp"
|
android:textSize="8dp"
|
||||||
tools:text="金牌主持"
|
tools:text="金牌主持"
|
||||||
|
android:includeFontPadding="false"
|
||||||
app:layout_constraintEnd_toEndOf="@id/iv_official_mask"
|
app:layout_constraintEnd_toEndOf="@id/iv_official_mask"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
@@ -13,24 +13,14 @@
|
|||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
tools:layout_width="60dp" />
|
tools:layout_width="60dp" />
|
||||||
|
|
||||||
<include
|
|
||||||
android:id="@+id/in_official_mask"
|
|
||||||
layout="@layout/layout_official_mask"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/dp_15"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginEnd="5.5dp"
|
|
||||||
android:layout_toEndOf="@id/noble_avatar_view"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/nick"
|
android:id="@+id/nick"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_toEndOf="@id/in_official_mask"
|
android:layout_toEndOf="@id/noble_avatar_view"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxWidth="80dp"
|
android:maxWidth="80dp"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
@@ -93,6 +83,17 @@
|
|||||||
android:layout_marginEnd="@dimen/dp_5"
|
android:layout_marginEnd="@dimen/dp_5"
|
||||||
android:src="@drawable/icon_admin_logo" />
|
android:src="@drawable/icon_admin_logo" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/in_official_mask"
|
||||||
|
layout="@layout/layout_official_mask"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_15"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginEnd="5.5dp"
|
||||||
|
android:layout_toEndOf="@id/noble_avatar_view"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_user_exper"
|
android:id="@+id/iv_user_exper"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -112,6 +113,8 @@
|
|||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@@ -86,7 +86,7 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_15"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintStart_toEndOf="@id/iv_user_charm_level"
|
app:layout_constraintStart_toEndOf="@id/iv_user_charm_level"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/iv_user_wealth_level"
|
app:layout_constraintBottom_toBottomOf="@id/iv_user_wealth_level"
|
||||||
@@ -96,10 +96,10 @@
|
|||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/in_official_mask"
|
android:id="@+id/in_official_mask"
|
||||||
|
layout="@layout/layout_official_mask"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_15"
|
android:layout_height="match_parent"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:visibility="visible"
|
tools:visibility="visible" />
|
||||||
layout="@layout/layout_official_mask" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -548,9 +548,9 @@ public class UserInfo implements Serializable {
|
|||||||
map.put(HAS_PRETTY, userInfo.isHasPrettyErbanNo());
|
map.put(HAS_PRETTY, userInfo.isHasPrettyErbanNo());
|
||||||
|
|
||||||
// 官方认证文本,图标
|
// 官方认证文本,图标
|
||||||
if (userInfo.getNameplate() != null) {
|
if (!TextUtils.isEmpty(userInfo.getNameplateWord()) && !TextUtils.isEmpty(userInfo.getNameplatePic())) {
|
||||||
map.put(OAC_NAME, userInfo.getNameplate().getFixedWord());
|
map.put(OAC_NAME, userInfo.getNameplateWord());
|
||||||
map.put(OAC_ICON, userInfo.getNameplate().getIconPic());
|
map.put(OAC_ICON, userInfo.getNameplatePic());
|
||||||
} else {
|
} else {
|
||||||
map.put(OAC_NAME, "");
|
map.put(OAC_NAME, "");
|
||||||
map.put(OAC_ICON, "");
|
map.put(OAC_ICON, "");
|
||||||
|
Reference in New Issue
Block a user