删除老的用户等级主播等级的图标
This commit is contained in:
parent
418073f07e
commit
aad607ace8
@ -12,7 +12,6 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.bean.FansMedalBean;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.UserItemBean;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
@ -29,7 +28,6 @@ import java.util.Map;
|
||||
/**
|
||||
* Created by cxf on 2017/8/4.
|
||||
*/
|
||||
|
||||
public class CommonAppConfig {
|
||||
//域名
|
||||
public static final String HOST = getMetaDataString("SERVER_HOST");
|
||||
@ -109,7 +107,6 @@ public class CommonAppConfig {
|
||||
private boolean mLaunched;//App是否启动了
|
||||
private String mJPushAppKey;//极光推送的AppKey
|
||||
private List<UserItemBean> mUserItemList;//个人中心功能列表
|
||||
private SparseArray<LevelBean> mLevelMap;
|
||||
private SparseArray<FansMedalBean> mAnchorFansMedalMap;
|
||||
private String mGiftListJson;
|
||||
private String mWrapListJson;
|
||||
@ -520,27 +517,6 @@ public class CommonAppConfig {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存用户等级信息
|
||||
*/
|
||||
public void setLevel(String levelJson) {
|
||||
if (TextUtils.isEmpty(levelJson)) {
|
||||
return;
|
||||
}
|
||||
List<LevelBean> list = JSON.parseArray(levelJson, LevelBean.class);
|
||||
if (list == null || list.size() == 0) {
|
||||
return;
|
||||
}
|
||||
if (mLevelMap == null) {
|
||||
mLevelMap = new SparseArray<>();
|
||||
}
|
||||
mLevelMap.clear();
|
||||
for (LevelBean bean : list) {
|
||||
mLevelMap.put(bean.getLevel(), bean);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存主播粉丝徽章信息
|
||||
*/
|
||||
@ -579,24 +555,6 @@ public class CommonAppConfig {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户等级
|
||||
*/
|
||||
public LevelBean getLevel(int level) {
|
||||
if (mLevelMap == null) {
|
||||
String configString = SpUtil.getInstance().getStringValue(SpUtil.CONFIG);
|
||||
if (!TextUtils.isEmpty(configString)) {
|
||||
JSONObject obj = JSON.parseObject(configString);
|
||||
setLevel(obj.getString("level"));
|
||||
}
|
||||
}
|
||||
if (mLevelMap == null || mLevelMap.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
return mLevelMap.get(level);
|
||||
}
|
||||
|
||||
|
||||
public String getGiftListJson() {
|
||||
return mGiftListJson;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.yunbao.live.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -36,6 +37,7 @@ import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.socket.SocketSendBean;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
@ -287,11 +289,19 @@ public class AnchorUserMicInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
mName.setText(bean.getUserNiceName());
|
||||
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.GuardUserBean;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/11/6.
|
||||
@ -111,10 +112,18 @@ public class GuardAdapter extends RefreshAdapter<GuardUserBean> {
|
||||
ImgLoader.displayAvatar(mContext, bean.getAvatar(), mAvatar);
|
||||
mName.setText(bean.getUserNiceName());
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
mVotes.setText(Html.fromHtml(" <font color='#ffdd00'>" + bean.getContribute() + "</font> " + mVotesName));
|
||||
}
|
||||
}
|
||||
@ -146,10 +155,17 @@ public class GuardAdapter extends RefreshAdapter<GuardUserBean> {
|
||||
ImgLoader.displayAvatar(mContext, bean.getAvatar(), mAvatar);
|
||||
mName.setText(bean.getUserNiceName());
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
mVotes.setText(bean.getContribute() + " " + mVotesName);
|
||||
if (bean.getType() == Constants.GUARD_TYPE_DAY) {
|
||||
mIcon.setImageDrawable(mGuardDrawable0);
|
||||
|
@ -3,6 +3,8 @@ package com.yunbao.live.adapter;
|
||||
import android.content.Context;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -18,6 +20,7 @@ import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -106,10 +109,17 @@ public class LiveAdminListAdapter extends RecyclerView.Adapter<LiveAdminListAdap
|
||||
ImgLoader.displayAvatar(mContext,bean.getAvatar(), mAvatar);
|
||||
mName.setText(bean.getUserNiceName());
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext,levelBean.getThumb(), mLevel);
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package com.yunbao.live.adapter;
|
||||
import android.content.Context;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -16,6 +18,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveShutUpBean;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -103,10 +106,17 @@ public class LiveBlackAdapter extends RefreshAdapter<LiveShutUpBean> {
|
||||
ImgLoader.displayAvatar(mContext, bean.getAvatar(), mAvatar);
|
||||
mName.setText(bean.getUserNiceName());
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
}
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package com.yunbao.live.adapter;
|
||||
import android.content.Context;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -16,6 +18,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveShutUpBean;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -103,10 +106,17 @@ public class LiveShutUpAdapter extends RefreshAdapter<LiveShutUpBean> {
|
||||
ImgLoader.displayAvatar(mContext, bean.getAvatar(), mAvatar);
|
||||
mName.setText(bean.getUserNiceName());
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
}
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import android.content.Context;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
@ -24,6 +25,7 @@ import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.common.bean.MicUserBean;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
@ -114,10 +116,17 @@ public class UserMicInfoAdapter extends RefreshAdapter<MicUserBean> {
|
||||
mName.setText(bean.getUserNiceName());
|
||||
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,6 @@ import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||
import com.yunbao.common.bean.LiveUserRankBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
@ -148,7 +147,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
|
||||
}
|
||||
});
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
|
||||
|
||||
title.setVisibility(View.GONE);
|
||||
title1.setVisibility(View.GONE);
|
||||
@ -285,8 +284,8 @@ 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, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
@ -298,7 +297,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (bean.isHide() && (type.equals("5") || type.equals("4"))) {
|
||||
mName.setText(R.string.mystery_man);
|
||||
ImgLoader.display2(mContext, R.mipmap.hide, mAvatar);
|
||||
|
@ -205,9 +205,8 @@ public class LiveGiveHotDialogFragment extends AbsDialogFragment {
|
||||
ImgLoader.displayAvatar(mContext, mDatas.get(position).getUser_avatar(), viewHolder.img_head);
|
||||
viewHolder.tv_name.setText(mDatas.get(position).getUser_name());
|
||||
viewHolder.sex.setImageResource(CommonIconUtil.getSexIcon(mDatas.get(position).getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(mDatas.get(position).getLevel());
|
||||
if (levelBean != null) {
|
||||
new LiveTextRender().getLevelImage(mContext, levelBean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
|
||||
new LiveTextRender().getLevelImage(mContext, mDatas.get(position).getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, viewHolder.level);
|
||||
@ -218,7 +217,7 @@ public class LiveGiveHotDialogFragment extends AbsDialogFragment {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String hotStr = mDatas.get(position).getHot_score().substring(0, mDatas.get(position).getHot_score().length() - 3);
|
||||
viewHolder.tv_hot_number.setText(hotStr + "k");
|
||||
viewHolder.tv_hot_time.setText(mDatas.get(position).getHot_score_end_time());
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@ -18,21 +19,20 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.adapter.RefreshAdapter;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.custom.CommonRefreshView;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.adapter.GuardAdapter;
|
||||
import com.yunbao.live.bean.GuardUserBean;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@ -184,6 +184,7 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
||||
initView();
|
||||
return show;
|
||||
}
|
||||
|
||||
private void setAdapterData() {
|
||||
if (list.isEmpty()) {
|
||||
userLayout.setVisibility(View.INVISIBLE);
|
||||
@ -196,10 +197,18 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
||||
String guardString = mContext.getString(R.string.guard_week_con);
|
||||
userGuard.setText(guardString + " " + bean.getContribute());
|
||||
userSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), userLevel);
|
||||
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, userLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
if (mLiveGuardInfo != null) {
|
||||
int guardType = mLiveGuardInfo.getMyGuardType();
|
||||
@ -217,6 +226,7 @@ public class LiveNewGuardListDialogFragment extends AbsDialogFragment implements
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setList(List<GuardUserBean> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
@ -414,12 +414,17 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View
|
||||
}
|
||||
}
|
||||
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||
|
||||
|
||||
LevelBean levelBean = appConfig.getLevel(obj.getIntValue("level"));
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getBgIcon(), mLevel);
|
||||
new LiveTextRender().getLevelImage(mContext,obj.getIntValue("level"), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
mLevelAnchorText.setText(String.valueOf(levelAnchor));
|
||||
mLevelText.setText(String.valueOf(level));
|
||||
mSex.setImageResource(CommonIconUtil.getSexIcon(obj.getIntValue("sex")));
|
||||
|
@ -5,6 +5,7 @@ import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@ -53,6 +54,7 @@ import com.yunbao.live.interfaces.ILiveLinkMicViewHolder;
|
||||
import com.yunbao.live.interfaces.LivePushListener;
|
||||
import com.yunbao.live.socket.SocketClient;
|
||||
import com.yunbao.live.socket.SocketLinkMicUtil;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
import com.yunbao.live.views.AbsLiveLinkMicPlayViewHolder;
|
||||
import com.yunbao.live.views.AbsLiveLinkMicPushViewHolder;
|
||||
import com.yunbao.live.views.LiveLinkMicPlayTxViewHolder;
|
||||
@ -631,10 +633,17 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
ImgLoader.display(mContext, u.getAvatar(), avatar);
|
||||
name.setText(u.getUserNiceName());
|
||||
sex.setImageResource(CommonIconUtil.getSexIcon(u.getSex()));
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(u.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), level);
|
||||
new LiveTextRender().getLevelImage(mContext, u.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, level);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
mLinkMicWaitCount = LINK_MIC_COUNT_MAX;
|
||||
mLinkMicWaitText.setText(mLinkMicWaitString + "(" + mLinkMicWaitCount + ")...");
|
||||
mLinkMicPopWindow = new PopupWindow(v, DpUtil.dp2px(280), ViewGroup.LayoutParams.WRAP_CONTENT, true);
|
||||
|
@ -31,11 +31,9 @@ import androidx.core.content.ContextCompat;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.MsgModel;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.custom.VerticalImageSpan;
|
||||
@ -762,11 +760,14 @@ public class LiveTextRender {
|
||||
}
|
||||
|
||||
private void renderEnterRoomTMP(Context context, final TextView textView, final LiveChatBean bean) {
|
||||
final LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean == null) {
|
||||
return;
|
||||
List<NewLevelModel> models = new NewLevelManager(context).getNewLevelModels();
|
||||
String imgUrl = "https://downs.yaoulive.com/level/user_lv1_bg.png";
|
||||
for (NewLevelModel newLevelModel : models) {
|
||||
if (newLevelModel.getLeveMin() <= bean.getLevel() && bean.getLevel() <= newLevelModel.getLeveMax()) {
|
||||
imgUrl = newLevelModel.getThumb();
|
||||
}
|
||||
ImgLoader.displayDrawable(context, levelBean.getThumb(), new ImgLoader.DrawableCallback() {
|
||||
}
|
||||
ImgLoader.displayDrawable(context, imgUrl, new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
if (textView != null) {
|
||||
|
@ -10,9 +10,9 @@ import android.view.animation.LinearInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.manager.NewLevelManager;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
import com.yunbao.common.views.AbsViewHolder;
|
||||
@ -20,6 +20,8 @@ import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveDanMuBean;
|
||||
import com.yunbao.live.interfaces.IDanmuActionListener;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/25.
|
||||
* 弹幕
|
||||
@ -89,10 +91,14 @@ public class DanmuViewHolder extends AbsViewHolder {
|
||||
mLineNum = lineNum;
|
||||
ImgLoader.display(mContext, bean.getAvatar(), mAvatar);
|
||||
mName.setText(bean.getUserNiceName());
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
mName.setTextColor(Color.parseColor(levelBean.getColor()));
|
||||
List<NewLevelModel> models = new NewLevelManager(mContext).getNewLevelModels();
|
||||
String imgUrl = "#68F1F4";
|
||||
for (NewLevelModel newLevelModel : models) {
|
||||
if (newLevelModel.getLeveMin() <= bean.getLevel() && bean.getLevel() <= newLevelModel.getLeveMax()) {
|
||||
imgUrl = newLevelModel.getColour();
|
||||
}
|
||||
}
|
||||
mName.setTextColor(Color.parseColor(imgUrl));
|
||||
mContent.setText(bean.getContent());
|
||||
mCanNext = false;
|
||||
mContentView.measure(0, 0);
|
||||
|
@ -12,13 +12,17 @@ import android.widget.TextView;
|
||||
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.manager.NewLevelManager;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveDanMuBean;
|
||||
import com.yunbao.live.interfaces.IDanmuActionListener;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/25.
|
||||
* 弹幕
|
||||
@ -89,10 +93,15 @@ public class FansDanmuViewHolder extends DanmuViewHolder {
|
||||
mLineNum = lineNum;
|
||||
ImgLoader.display(mContext,bean.getAvatar(), mAvatar);
|
||||
mName.setText(bean.getUserNiceName()+":");
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
mName.setTextColor(Color.parseColor(levelBean.getColor()));
|
||||
|
||||
List<NewLevelModel> models = new NewLevelManager(mContext).getNewLevelModels();
|
||||
String imgUrl = "#68F1F4";
|
||||
for (NewLevelModel newLevelModel : models) {
|
||||
if (newLevelModel.getLeveMin() <= bean.getLevel() && bean.getLevel() <= newLevelModel.getLeveMax()) {
|
||||
imgUrl = newLevelModel.getColour();
|
||||
}
|
||||
}
|
||||
mName.setTextColor(Color.parseColor(imgUrl));
|
||||
mContent.setText(bean.getContent());
|
||||
mCanNext = false;
|
||||
mContentView.measure(0, 0);
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.yunbao.main.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -27,6 +28,7 @@ import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.live.bean.SearchUserBean;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
import com.yunbao.main.R;
|
||||
|
||||
import java.util.List;
|
||||
@ -172,11 +174,17 @@ public class SearchAdapter extends RefreshAdapter<SearchUserBean> {
|
||||
}
|
||||
leave.setText(bean.getLevelAnchor() + "");
|
||||
ImgLoader.display(itemView.getContext(), imgUrl, mLevelAnchor);
|
||||
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
new LiveTextRender().getLevelImage(mContext, bean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Outline;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -34,7 +35,6 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.HtmlConfig;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.GoogleBean;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.UserItemBean;
|
||||
import com.yunbao.common.event.CompleteInformationEvent;
|
||||
@ -55,6 +55,7 @@ import com.yunbao.live.activity.LiveRecordActivity;
|
||||
import com.yunbao.live.activity.RoomManageActivity;
|
||||
import com.yunbao.live.activity.WebViewActivityMedal;
|
||||
import com.yunbao.live.bean.SlideBean;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
import com.yunbao.live.views.CustomMyViewHolder;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.EditProfileActivity;
|
||||
@ -375,9 +376,17 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
|
||||
} else {
|
||||
Constants.isAnchor = false;
|
||||
LevelBean levelBean = appConfig.getLevel(u.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
new LiveTextRender().getLevelImage(mContext, u.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
//用户等级
|
||||
tv_level.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -387,8 +396,8 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
||||
ZhuangBanActivity.forward(mContext, url);
|
||||
}
|
||||
});
|
||||
tv_level.setText(levelBean.getLevel() + "");
|
||||
}
|
||||
tv_level.setText(u.getLevel() + "");
|
||||
|
||||
}
|
||||
//修改靓号图标 个人中心
|
||||
if (u.getGoodnum() != null && !u.getGoodnum().equals("")) {
|
||||
|
@ -3,8 +3,7 @@ package com.yunbao.main.views;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -14,6 +13,9 @@ import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
@ -22,7 +24,6 @@ import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.GoogleBean;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.bean.UserItemBean;
|
||||
@ -37,6 +38,7 @@ import com.yunbao.common.views.AbsMainViewHolder;
|
||||
import com.yunbao.live.activity.LiveRecordActivity;
|
||||
import com.yunbao.live.activity.RoomManageActivity;
|
||||
import com.yunbao.live.activity.WebViewActivityMedal;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.activity.EditProfileActivity;
|
||||
import com.yunbao.main.activity.FansActivity;
|
||||
@ -306,11 +308,17 @@ public class MainMeViewHolder1 extends AbsMainViewHolder implements OnItemClickL
|
||||
}
|
||||
leave.setText(String.valueOf(u.getLevelAnchor()));
|
||||
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||
|
||||
LevelBean levelBean = appConfig.getLevel(u.getLevel());
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||
new LiveTextRender().getLevelImage(mContext, u.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
//修改靓号图标 个人中心
|
||||
if (u.getGoodnum() != null && !u.getGoodnum().equals("")) {
|
||||
good_nub_ico.setVisibility(View.VISIBLE);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.yunbao.main.views;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.Html;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
@ -13,8 +14,6 @@ import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@ -23,6 +22,7 @@ import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.utils.WordsTypeUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.event.JumpUserHomeEvent;
|
||||
|
||||
@ -76,10 +76,18 @@ public class SearchResultsViewHolder extends RecyclerView.ViewHolder {
|
||||
.into(isLive);
|
||||
//用戶直接隱藏
|
||||
if (type == 3) {
|
||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(Integer.parseInt(model.getLevel()));
|
||||
if (levelBean != null) {
|
||||
ImgLoader.display(itemView.getContext(), levelBean.getThumb(), contribute);
|
||||
|
||||
new LiveTextRender().getLevelImage(itemView.getContext(), Integer.parseInt(model.getLevel()), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(itemView.getContext(), drawable, contribute);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
isLive.setVisibility(View.GONE);
|
||||
} else {
|
||||
List<NewLevelModel> models = new NewLevelManager(itemView.getContext()).getNewAnchorLevelModels();
|
||||
|
@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -23,7 +24,6 @@ import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.adapter.ViewPagerAdapter;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.bean.NewLevelModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.event.FollowEvent;
|
||||
@ -44,6 +44,7 @@ import com.yunbao.live.bean.SearchUserBean;
|
||||
import com.yunbao.live.custom.MyTextView;
|
||||
import com.yunbao.live.dialog.LiveShareDialogFragment;
|
||||
import com.yunbao.live.presenter.UserHomeSharePresenter;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
import com.yunbao.live.views.AbsLivePageViewHolder;
|
||||
import com.yunbao.live.views.AbsUserHomeViewHolder;
|
||||
import com.yunbao.live.views.LiveRecordViewHolder;
|
||||
@ -368,11 +369,17 @@ public class UserHomeViewHolder extends AbsLivePageViewHolder implements AppBarL
|
||||
}
|
||||
leave.setText(String.valueOf(anchorLevel));
|
||||
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||
new LiveTextRender().getLevelImage(mContext, userBean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
LevelBean level = appConfig.getLevel(userBean.getLevel());
|
||||
ImgLoader.display(mContext, level.getThumb(), mLevel);
|
||||
|
||||
}
|
||||
});
|
||||
mID.setText(userBean.getLiangNameTip());
|
||||
String fansNum = StringUtil.toWan(userBean.getFans());
|
||||
mBtnFans.setText(fansNum + " " + mContext.getString(R.string.fans));
|
||||
|
@ -59,6 +59,7 @@ import com.yunbao.live.activity.LiveReportActivity;
|
||||
import com.yunbao.live.bean.SearchUserBean;
|
||||
import com.yunbao.live.dialog.LiveShareDialogFragment;
|
||||
import com.yunbao.live.presenter.UserHomeSharePresenter;
|
||||
import com.yunbao.live.utils.LiveTextRender;
|
||||
import com.yunbao.live.views.AbsLivePageViewHolder;
|
||||
import com.yunbao.live.views.AbsUserHomeViewHolder;
|
||||
import com.yunbao.live.views.LiveRecordViewHolder;
|
||||
@ -516,9 +517,17 @@ public class UserHomeViewHolder2 extends AbsLivePageViewHolder implements LiveSh
|
||||
}
|
||||
leave.setText(String.valueOf(userBean.getLevelAnchor()));
|
||||
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||
new LiveTextRender().getLevelImage(mContext, userBean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||
@Override
|
||||
public void onLoadSuccess(Drawable drawable) {
|
||||
ImgLoader.display2(mContext, drawable, mLevel);
|
||||
}
|
||||
|
||||
LevelBean level = appConfig.getLevel(userBean.getLevel());
|
||||
ImgLoader.display(mContext, level.getThumb(), mLevel);
|
||||
@Override
|
||||
public void onLoadFailed() {
|
||||
|
||||
}
|
||||
});
|
||||
//修改靓号图标 个人中心子页面
|
||||
if (userBean.getGoodnum() != null && !userBean.getGoodnum().equals("")) {
|
||||
good_nub_ico.setVisibility(View.VISIBLE);
|
||||
|
@ -56,23 +56,24 @@
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="19dp">
|
||||
android:layout_width="30dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_height="15dp">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/level_anchor"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="19dp" />
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="15dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/leave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="28dp"
|
||||
android:layout_marginStart="13dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
android:textSize="8sp"
|
||||
android:textStyle="bold" />
|
||||
</FrameLayout>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user