主播等级
This commit is contained in:
parent
2102acd9e5
commit
a50abb5b2c
@ -280,10 +280,10 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
if (levelBean != null) {
|
||||
new LiveTextRender().getLevelImage(mContext, levelBean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
new LiveTextRender().getLevelImage(mContext, levelBean.getLevel(), false, new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext,drawable, mLevel);
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -299,7 +299,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
itemView.findViewById(R.id.state).setVisibility(View.GONE);
|
||||
gift_svga.setVisibility(View.GONE);
|
||||
} else {
|
||||
ImgLoader.display2(mContext, bean.getAvatar(), mAvatar,100,100);
|
||||
ImgLoader.display2(mContext, bean.getAvatar(), mAvatar, 100, 100);
|
||||
mName.setText(bean.getUserNiceName());
|
||||
itemView.findViewById(R.id.state).setVisibility(View.VISIBLE);
|
||||
gift_svga.setVisibility(View.VISIBLE);
|
||||
|
@ -385,31 +385,31 @@ public class LiveTextRender {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public void getLevelImage(Context mContext, int userLevel, ImgLoader.DrawableCallback callback) {
|
||||
public void getLevelImage(Context mContext, int userLevel, boolean anchorUserType, ImgLoader.DrawableCallback callback) {
|
||||
|
||||
String imgUrl = "https://downs.yaoulive.com/level/user_lv1_bg.png";
|
||||
String imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv1_bg.png" : "https://downs.yaoulive.com/level/user_lv1_bg.png";
|
||||
if (0 < userLevel && userLevel < 10) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv1_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv1_bg.png" : "https://downs.yaoulive.com/level/user_lv1_bg.png";
|
||||
} else if (9 < userLevel && userLevel < 20) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv10_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv10_bg.png" : "https://downs.yaoulive.com/level/user_lv10_bg.png";
|
||||
} else if (19 < userLevel && userLevel < 30) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv20_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_l20_bg.png" : "https://downs.yaoulive.com/level/user_lv20_bg.png";
|
||||
} else if (29 < userLevel && userLevel < 40) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv30_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv30_bg.png" : "https://downs.yaoulive.com/level/user_lv30_bg.png";
|
||||
} else if (39 < userLevel && userLevel < 50) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv40_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv40_bg.png" : "https://downs.yaoulive.com/level/user_lv40_bg.png";
|
||||
} else if (49 < userLevel && userLevel < 60) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv50_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv50_bg.png" : "https://downs.yaoulive.com/level/user_lv50_bg.png";
|
||||
} else if (59 < userLevel && userLevel < 70) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv60_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv60_bg.png" : "https://downs.yaoulive.com/level/user_lv60_bg.png";
|
||||
} else if (69 < userLevel && userLevel < 80) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv70_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv70_bg.png" : "https://downs.yaoulive.com/level/user_lv70_bg.png";
|
||||
} else if (79 < userLevel && userLevel < 90) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv80_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv80_bg.png" : "https://downs.yaoulive.com/level/user_lv80_bg.png";
|
||||
} else if (89 < userLevel && userLevel < 100) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv90_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv90_bg.png" : "https://downs.yaoulive.com/level/user_lv90_bg.png";
|
||||
} else if (99 < userLevel && userLevel < 110) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv100_bg.png";
|
||||
imgUrl = anchorUserType ? "https://downs.yaoulive.com/level/anchor_lv100_bg.png" : "https://downs.yaoulive.com/level/user_lv100_bg.png";
|
||||
} else if (109 < userLevel && userLevel < 120) {
|
||||
imgUrl = "https://downs.yaoulive.com/level/user_lv110_bg.png";
|
||||
} else if (userLevel == 120) {
|
||||
@ -454,7 +454,7 @@ public class LiveTextRender {
|
||||
}
|
||||
} else {
|
||||
if (textView != null) {
|
||||
getLevelImage(context, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
getLevelImage(context, bean.getLevel(), bean.isAnchor(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
SpannableStringBuilder builder = createPrefix(drawable, bean);
|
||||
|
Loading…
Reference in New Issue
Block a user