Merge remote-tracking branch 'origin/dev_6.6.4_战令' into dev_6.6.4_战令
This commit is contained in:
commit
17506f6cbf
@ -110,7 +110,6 @@ public class CommonAppConfig {
|
|||||||
private String mJPushAppKey;//极光推送的AppKey
|
private String mJPushAppKey;//极光推送的AppKey
|
||||||
private List<UserItemBean> mUserItemList;//个人中心功能列表
|
private List<UserItemBean> mUserItemList;//个人中心功能列表
|
||||||
private SparseArray<LevelBean> mLevelMap;
|
private SparseArray<LevelBean> mLevelMap;
|
||||||
private SparseArray<LevelBean> mAnchorLevelMap;
|
|
||||||
private SparseArray<FansMedalBean> mAnchorFansMedalMap;
|
private SparseArray<FansMedalBean> mAnchorFansMedalMap;
|
||||||
private String mGiftListJson;
|
private String mGiftListJson;
|
||||||
private String mWrapListJson;
|
private String mWrapListJson;
|
||||||
@ -541,25 +540,6 @@ public class CommonAppConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存主播等级信息
|
|
||||||
*/
|
|
||||||
public void setAnchorLevel(String anchorLevelJson) {
|
|
||||||
if (TextUtils.isEmpty(anchorLevelJson)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
List<LevelBean> list = JSON.parseArray(anchorLevelJson, LevelBean.class);
|
|
||||||
if (list == null || list.size() == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (mAnchorLevelMap == null) {
|
|
||||||
mAnchorLevelMap = new SparseArray<>();
|
|
||||||
}
|
|
||||||
mAnchorLevelMap.clear();
|
|
||||||
for (LevelBean bean : list) {
|
|
||||||
mAnchorLevelMap.put(bean.getLevel(), bean);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存主播粉丝徽章信息
|
* 保存主播粉丝徽章信息
|
||||||
@ -616,22 +596,6 @@ public class CommonAppConfig {
|
|||||||
return mLevelMap.get(level);
|
return mLevelMap.get(level);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取主播等级
|
|
||||||
*/
|
|
||||||
public LevelBean getAnchorLevel(int level) {
|
|
||||||
if (mAnchorLevelMap == null) {
|
|
||||||
String configString = SpUtil.getInstance().getStringValue(SpUtil.CONFIG);
|
|
||||||
if (!TextUtils.isEmpty(configString)) {
|
|
||||||
JSONObject obj = JSON.parseObject(configString);
|
|
||||||
setAnchorLevel(obj.getString("levelanchor"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (mAnchorLevelMap == null || mAnchorLevelMap.size() == 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return mAnchorLevelMap.get(level);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGiftListJson() {
|
public String getGiftListJson() {
|
||||||
return mGiftListJson;
|
return mGiftListJson;
|
||||||
|
@ -181,8 +181,6 @@ public class CommonHttpUtil {
|
|||||||
JSONObject obj = JSON.parseObject(info[0]);
|
JSONObject obj = JSON.parseObject(info[0]);
|
||||||
ConfigBean bean = JSON.toJavaObject(obj, ConfigBean.class);
|
ConfigBean bean = JSON.toJavaObject(obj, ConfigBean.class);
|
||||||
CommonAppConfig.getInstance().setConfig(bean);
|
CommonAppConfig.getInstance().setConfig(bean);
|
||||||
CommonAppConfig.getInstance().setLevel(obj.getString("level"));
|
|
||||||
CommonAppConfig.getInstance().setAnchorLevel(obj.getString("levelanchor"));
|
|
||||||
CommonAppConfig.getInstance().alert_time = obj.getInteger("alert_time");
|
CommonAppConfig.getInstance().alert_time = obj.getInteger("alert_time");
|
||||||
CommonAppConfig.getInstance().alert_end_time = obj.getInteger("alert_end_time");
|
CommonAppConfig.getInstance().alert_end_time = obj.getInteger("alert_end_time");
|
||||||
//解析粉丝徽章
|
//解析粉丝徽章
|
||||||
|
@ -350,7 +350,11 @@ public class LiveHttpUtil {
|
|||||||
.params("p", p)
|
.params("p", p)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
public static void getContactMsg(int page, HttpCallback callback) {
|
||||||
|
HttpClient.getInstance().get("Live.getContactMsg", "getContactMsg")
|
||||||
|
.params("p", page)
|
||||||
|
.execute(callback);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 观众跟主播连麦时,获取自己的流地址
|
* 观众跟主播连麦时,获取自己的流地址
|
||||||
|
@ -667,7 +667,9 @@ public interface PDLiveApi {
|
|||||||
* 获取收件箱信息
|
* 获取收件箱信息
|
||||||
*/
|
*/
|
||||||
@GET("/api/public/?service=Live.getContactMsg")
|
@GET("/api/public/?service=Live.getContactMsg")
|
||||||
Observable<ResponseModel<List<LiveUserMailBoxModel>>> getContactMsg();
|
Observable<ResponseModel<List<LiveUserMailBoxModel>>> getContactMsg(
|
||||||
|
@Query("p") int page
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除联系方式信件
|
* 删除联系方式信件
|
||||||
|
@ -1267,20 +1267,25 @@ public class LiveNetManager {
|
|||||||
*
|
*
|
||||||
* @param callback 回调
|
* @param callback 回调
|
||||||
*/
|
*/
|
||||||
public void getContactMsg(HttpCallback<List<LiveUserMailBoxModel>> callback) {
|
private Disposable contactMsgApi;
|
||||||
API.get().pdLiveApi(mContext)
|
|
||||||
.getContactMsg()
|
public synchronized void getContactMsg(int page, HttpCallback<List<LiveUserMailBoxModel>> callback) {
|
||||||
|
contactMsgApi = API.get().pdLiveApi(mContext)
|
||||||
|
.getContactMsg(page)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(listResponseModel -> {
|
.subscribe(listResponseModel -> {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
|
|
||||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
}
|
}
|
||||||
|
contactMsgApi = null;
|
||||||
}, throwable -> {
|
}, throwable -> {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
callback.onError(throwable.getMessage());
|
callback.onError(throwable.getMessage());
|
||||||
}
|
}
|
||||||
}).isDisposed();
|
contactMsgApi = null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2619,6 +2624,7 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBattlePassUserInfo(HttpCallback<BattlePassUserInfoBean> callback) {
|
public void getBattlePassUserInfo(HttpCallback<BattlePassUserInfoBean> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.getBattlePassUserInfo()
|
.getBattlePassUserInfo()
|
||||||
@ -2638,6 +2644,7 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getLiveBattlePassRewards(HttpCallback<LiveBattlePassRewardsBean> callback) {
|
public void getLiveBattlePassRewards(HttpCallback<LiveBattlePassRewardsBean> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.getLiveBattlePassRewards()
|
.getLiveBattlePassRewards()
|
||||||
@ -2679,6 +2686,7 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBattlePassTask(HttpCallback<BattlePassTask> callback) {
|
public void getBattlePassTask(HttpCallback<BattlePassTask> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.getBattlePassTask()
|
.getBattlePassTask()
|
||||||
@ -2698,6 +2706,7 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBattlePassTaskOver(String taskId, HttpCallback<HttpCallbackModel> callback) {
|
public void getBattlePassTaskOver(String taskId, HttpCallback<HttpCallbackModel> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.getTask(taskId)
|
.getTask(taskId)
|
||||||
@ -2719,6 +2728,7 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBattlePassPoints(HttpCallback<List<BattlePassPoints>> callback) {
|
public void getBattlePassPoints(HttpCallback<List<BattlePassPoints>> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.getBattlePassPoints()
|
.getBattlePassPoints()
|
||||||
@ -2738,6 +2748,7 @@ public class LiveNetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getBattlePassRule(HttpCallback<String> callback) {
|
public void getBattlePassRule(HttpCallback<String> callback) {
|
||||||
API.get().pdLiveApi(mContext)
|
API.get().pdLiveApi(mContext)
|
||||||
.battlePassRule()
|
.battlePassRule()
|
||||||
@ -2791,5 +2802,8 @@ public class LiveNetManager {
|
|||||||
if (randomPkApi != null) {
|
if (randomPkApi != null) {
|
||||||
randomPkApi.dispose();
|
randomPkApi.dispose();
|
||||||
}
|
}
|
||||||
|
if (contactMsgApi != null) {
|
||||||
|
contactMsgApi.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1902,9 +1902,11 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
/**
|
/**
|
||||||
* 检查消息,有未读就要显示红点
|
* 检查消息,有未读就要显示红点
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private void checkMsgRed() {
|
private void checkMsgRed() {
|
||||||
|
|
||||||
LiveNetManager.get(mContext)
|
LiveNetManager.get(mContext)
|
||||||
.getContactMsg(new com.yunbao.common.http.base.HttpCallback<List<LiveUserMailBoxModel>>() {
|
.getContactMsg(1, new com.yunbao.common.http.base.HttpCallback<List<LiveUserMailBoxModel>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<LiveUserMailBoxModel> data) {
|
public void onSuccess(List<LiveUserMailBoxModel> data) {
|
||||||
Log.i(TAG, "onSuccess: " + data.size());
|
Log.i(TAG, "onSuccess: " + data.size());
|
||||||
@ -1927,6 +1929,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
showMsgRed(-1);
|
showMsgRed(-1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -9,14 +9,14 @@ import android.widget.ImageView;
|
|||||||
import android.widget.SeekBar;
|
import android.widget.SeekBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.activity.AbsActivity;
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.bean.SearchUserBean;
|
import com.yunbao.live.bean.SearchUserBean;
|
||||||
@ -24,6 +24,8 @@ import com.yunbao.live.dialog.LiveShareDialogFragment;
|
|||||||
import com.yunbao.live.presenter.UserHomeSharePresenter;
|
import com.yunbao.live.presenter.UserHomeSharePresenter;
|
||||||
import com.yunbao.live.views.LiveRecordPlayViewHolder;
|
import com.yunbao.live.views.LiveRecordPlayViewHolder;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/10/29.
|
* Created by cxf on 2018/10/29.
|
||||||
*/
|
*/
|
||||||
@ -83,9 +85,13 @@ public class LiveRecordPlayActivity extends AbsActivity implements
|
|||||||
mID = (TextView) findViewById(R.id.id_val);
|
mID = (TextView) findViewById(R.id.id_val);
|
||||||
mBtnFollow = findViewById(R.id.btn_follow);
|
mBtnFollow = findViewById(R.id.btn_follow);
|
||||||
ImgLoader.displayAvatar(mContext, mUserBean.getAvatar(), mAvatar);
|
ImgLoader.displayAvatar(mContext, mUserBean.getAvatar(), mAvatar);
|
||||||
LevelBean levelBean = CommonAppConfig.getInstance().getAnchorLevel(mUserBean.getLevelAnchor());
|
List<NewLevelModel> models = new NewLevelManager(mContext).getNewAnchorLevelModels();
|
||||||
if (levelBean != null) {
|
String imgUrl = "";
|
||||||
ImgLoader.display(mContext,levelBean.getThumbIcon(), mLevelAnchor);
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= mUserBean.getLevelAnchor() && mUserBean.getLevelAnchor() <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getIcon();
|
||||||
|
}
|
||||||
|
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||||
}
|
}
|
||||||
mName.setText(mUserBean.getUserNiceName());
|
mName.setText(mUserBean.getUserNiceName());
|
||||||
mID.setText(mUserBean.getLiangNameTip());
|
mID.setText(mUserBean.getLiangNameTip());
|
||||||
|
@ -1,22 +1,24 @@
|
|||||||
package com.yunbao.live.adapter;
|
package com.yunbao.live.adapter;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.yunbao.common.adapter.RefreshAdapter;
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.CommonIconUtil;
|
import com.yunbao.common.utils.CommonIconUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.bean.LivePkBean;
|
import com.yunbao.live.bean.LivePkBean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/11/15.
|
* Created by cxf on 2018/11/15.
|
||||||
*/
|
*/
|
||||||
@ -57,7 +59,7 @@ public class LivePkAdapter extends RefreshAdapter<LivePkBean> {
|
|||||||
class Vh extends RecyclerView.ViewHolder {
|
class Vh extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
ImageView mAvatar;
|
ImageView mAvatar;
|
||||||
TextView mName;
|
TextView mName, leave;
|
||||||
ImageView mSex;
|
ImageView mSex;
|
||||||
ImageView mLevel;
|
ImageView mLevel;
|
||||||
TextView mBtnInvite;
|
TextView mBtnInvite;
|
||||||
@ -66,6 +68,7 @@ public class LivePkAdapter extends RefreshAdapter<LivePkBean> {
|
|||||||
super(itemView);
|
super(itemView);
|
||||||
mAvatar = (ImageView) itemView.findViewById(R.id.avatar);
|
mAvatar = (ImageView) itemView.findViewById(R.id.avatar);
|
||||||
mName = (TextView) itemView.findViewById(R.id.name);
|
mName = (TextView) itemView.findViewById(R.id.name);
|
||||||
|
leave = itemView.findViewById(R.id.leave);
|
||||||
mSex = (ImageView) itemView.findViewById(R.id.sex);
|
mSex = (ImageView) itemView.findViewById(R.id.sex);
|
||||||
mLevel = (ImageView) itemView.findViewById(R.id.level);
|
mLevel = (ImageView) itemView.findViewById(R.id.level);
|
||||||
mBtnInvite = (TextView) itemView.findViewById(R.id.btn_invite);
|
mBtnInvite = (TextView) itemView.findViewById(R.id.btn_invite);
|
||||||
@ -77,10 +80,19 @@ public class LivePkAdapter extends RefreshAdapter<LivePkBean> {
|
|||||||
ImgLoader.display(mContext, bean.getAvatar(), mAvatar);
|
ImgLoader.display(mContext, bean.getAvatar(), mAvatar);
|
||||||
mName.setText(bean.getUserNiceName());
|
mName.setText(bean.getUserNiceName());
|
||||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||||
LevelBean levelBean = CommonAppConfig.getInstance().getAnchorLevel(bean.getLevelAnchor());
|
|
||||||
if (levelBean != null) {
|
List<NewLevelModel> models = new NewLevelManager(itemView.getContext()).getNewAnchorLevelModels();
|
||||||
ImgLoader.display(mContext,levelBean.getThumb(), mLevel);
|
int anchorLevel = 0;
|
||||||
|
anchorLevel = bean.getLevelAnchor();
|
||||||
|
String imgUrl = "";
|
||||||
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getThumb();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
leave.setText(String.valueOf(bean.getLevelAnchor()));
|
||||||
|
ImgLoader.display(itemView.getContext(), imgUrl, mLevel);
|
||||||
|
|
||||||
if (bean.isLinkMic()) {
|
if (bean.isLinkMic()) {
|
||||||
mBtnInvite.setText(mLivePkInviteString2);
|
mBtnInvite.setText(mLivePkInviteString2);
|
||||||
mBtnInvite.setEnabled(false);
|
mBtnInvite.setEnabled(false);
|
||||||
|
@ -12,6 +12,7 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
@ -21,28 +22,15 @@ import com.yunbao.common.views.weight.MarqueeTextView;
|
|||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
import com.yunbao.live.dialog.LiveUserAnchorMailBoxWebInfoPopDialog;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
public class LiveUserAnchorMailBoxAdapter extends RefreshAdapter<LiveUserMailBoxModel> {
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class LiveUserAnchorMailBoxAdapter extends RecyclerView.Adapter<LiveUserAnchorMailBoxAdapter.MailBoxViewHolder> {
|
|
||||||
private Context mContext;
|
|
||||||
private List<LiveUserMailBoxModel> list;
|
|
||||||
OnItemClickListener<LiveUserMailBoxModel> onItemClickListener;
|
OnItemClickListener<LiveUserMailBoxModel> onItemClickListener;
|
||||||
DialogInterface.OnDismissListener onWebDismissListener;
|
DialogInterface.OnDismissListener onWebDismissListener;
|
||||||
|
|
||||||
public LiveUserAnchorMailBoxAdapter(Context mContext) {
|
public LiveUserAnchorMailBoxAdapter(Context context) {
|
||||||
this.mContext = mContext;
|
super(context);
|
||||||
list = new ArrayList<>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setList(List<LiveUserMailBoxModel> list) {
|
|
||||||
this.list = list;
|
|
||||||
notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<LiveUserMailBoxModel> getList() {
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOnItemClickListener(OnItemClickListener<LiveUserMailBoxModel> onItemClickListener) {
|
public void setOnItemClickListener(OnItemClickListener<LiveUserMailBoxModel> onItemClickListener) {
|
||||||
this.onItemClickListener = onItemClickListener;
|
this.onItemClickListener = onItemClickListener;
|
||||||
@ -56,18 +44,20 @@ public class LiveUserAnchorMailBoxAdapter extends RecyclerView.Adapter<LiveUserA
|
|||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public MailBoxViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public MailBoxViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
return new MailBoxViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_live_user_mailbox, parent, false));
|
return new MailBoxViewHolder(mInflater.inflate(R.layout.item_live_user_mailbox, parent, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull MailBoxViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
holder.setData(list.get(position), position);
|
MailBoxViewHolder viewHolder = (MailBoxViewHolder) holder;
|
||||||
|
viewHolder.setData(mList.get(position), position);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// @Override
|
||||||
public int getItemCount() {
|
// public void onBindViewHolder(@NonNull MailBoxViewHolder holder, int position) {
|
||||||
return list.size();
|
// holder.setData(list.get(position), position);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
public class MailBoxViewHolder extends RecyclerView.ViewHolder {
|
public class MailBoxViewHolder extends RecyclerView.ViewHolder {
|
||||||
TextView topText;
|
TextView topText;
|
||||||
@ -100,9 +90,9 @@ public class LiveUserAnchorMailBoxAdapter extends RecyclerView.Adapter<LiveUserA
|
|||||||
public void onSuccess(String data) {
|
public void onSuccess(String data) {
|
||||||
Log.i("刪除信件", "onSuccess:刪除成功 ");
|
Log.i("刪除信件", "onSuccess:刪除成功 ");
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
list.removeIf(it -> it.getId() == box.getId());
|
mList.removeIf(it -> it.getId() == box.getId());
|
||||||
}
|
}
|
||||||
System.err.println("-----> list size = " + list.size());
|
System.err.println("-----> list size = " + mList.size());
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
if (onItemClickListener != null) {
|
if (onItemClickListener != null) {
|
||||||
onItemClickListener.onItemClick(box, position);
|
onItemClickListener.onItemClick(box, position);
|
||||||
|
@ -23,12 +23,11 @@ import com.opensource.svgaplayer.SVGADrawable;
|
|||||||
import com.opensource.svgaplayer.SVGAImageView;
|
import com.opensource.svgaplayer.SVGAImageView;
|
||||||
import com.opensource.svgaplayer.SVGAParser;
|
import com.opensource.svgaplayer.SVGAParser;
|
||||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
|
||||||
import com.tencent.imsdk.v2.V2TIMManager;
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
import com.yunbao.common.bean.LevelBean;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||||
@ -38,6 +37,7 @@ import com.yunbao.common.http.HttpCallback;
|
|||||||
import com.yunbao.common.http.LiveHttpConsts;
|
import com.yunbao.common.http.LiveHttpConsts;
|
||||||
import com.yunbao.common.http.LiveHttpUtil;
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.CommonIconUtil;
|
import com.yunbao.common.utils.CommonIconUtil;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||||
@ -58,9 +58,6 @@ import java.net.URL;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.rong.imlib.IRongCoreCallback;
|
|
||||||
import io.rong.imlib.IRongCoreEnum;
|
|
||||||
import io.rong.imlib.chatroom.base.RongChatRoomClient;
|
|
||||||
import pl.droidsonroids.gif.GifImageView;
|
import pl.droidsonroids.gif.GifImageView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -406,10 +403,19 @@ public class LiveOldUserDialogFragment extends AbsDialogFragment implements View
|
|||||||
int levelAnchor = obj.getIntValue("level_anchor");
|
int levelAnchor = obj.getIntValue("level_anchor");
|
||||||
int level = obj.getIntValue("level");
|
int level = obj.getIntValue("level");
|
||||||
mSign.setText(obj.getString("signature"));
|
mSign.setText(obj.getString("signature"));
|
||||||
LevelBean anchorLevelBean = appConfig.getAnchorLevel(obj.getIntValue("level_anchor"));
|
List<NewLevelModel> models = new NewLevelManager(mContext).getNewAnchorLevelModels();
|
||||||
if (anchorLevelBean != null) {
|
int anchorLevel = 0;
|
||||||
ImgLoader.display(mContext, anchorLevelBean.getBgIcon(), mLevelAnchor);
|
|
||||||
|
anchorLevel = obj.getIntValue("level_anchor");
|
||||||
|
String imgUrl = "";
|
||||||
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getIcon();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||||
|
|
||||||
|
|
||||||
LevelBean levelBean = appConfig.getLevel(obj.getIntValue("level"));
|
LevelBean levelBean = appConfig.getLevel(obj.getIntValue("level"));
|
||||||
if (levelBean != null) {
|
if (levelBean != null) {
|
||||||
ImgLoader.display(mContext, levelBean.getBgIcon(), mLevel);
|
ImgLoader.display(mContext, levelBean.getBgIcon(), mLevel);
|
||||||
|
@ -1,33 +1,35 @@
|
|||||||
package com.yunbao.live.dialog;
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||||
|
import com.yunbao.common.custom.CommonRefreshView;
|
||||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||||
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.adapter.LiveUserAnchorMailBoxAdapter;
|
import com.yunbao.live.adapter.LiveUserAnchorMailBoxAdapter;
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户获取主播联系方式信箱弹框
|
* 用户获取主播联系方式信箱弹框
|
||||||
*/
|
*/
|
||||||
public class LiveUserAnchorMailBoxPopDialog extends AbsDialogPopupWindow {
|
public class LiveUserAnchorMailBoxPopDialog extends AbsDialogPopupWindow {
|
||||||
private RecyclerView list;
|
private CommonRefreshView list;
|
||||||
private LiveUserAnchorMailBoxAdapter adapter;
|
private LiveUserAnchorMailBoxAdapter adapter;
|
||||||
private View empty;
|
private View empty;
|
||||||
|
|
||||||
@ -48,26 +50,84 @@ public class LiveUserAnchorMailBoxPopDialog extends AbsDialogPopupWindow {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
adapter = new LiveUserAnchorMailBoxAdapter(getContext());
|
|
||||||
list = findViewById(R.id.mailbox);
|
list = findViewById(R.id.mailbox);
|
||||||
empty = findViewById(R.id.ic_empty);
|
empty = findViewById(R.id.ic_empty);
|
||||||
list.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
list.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||||
list.setAdapter(adapter);
|
if (adapter == null) {
|
||||||
|
adapter = new LiveUserAnchorMailBoxAdapter(getContext());
|
||||||
|
}
|
||||||
|
list.setDataHelper(new CommonRefreshView.DataHelper<LiveUserMailBoxModel>() {
|
||||||
|
@Override
|
||||||
|
public RefreshAdapter<LiveUserMailBoxModel> getAdapter() {
|
||||||
|
if (adapter == null) {
|
||||||
|
adapter = new LiveUserAnchorMailBoxAdapter(getContext());
|
||||||
|
}
|
||||||
|
return adapter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadData(int p, com.yunbao.common.http.HttpCallback callback) {
|
||||||
|
LiveHttpUtil.getContactMsg(p, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LiveUserMailBoxModel> processData(String[] info) {
|
||||||
|
if (info != null) {
|
||||||
|
if (info.length > 0) {
|
||||||
|
empty.setVisibility(View.GONE);
|
||||||
|
list.setVisibility(View.VISIBLE);
|
||||||
|
return JSON.parseArray(Arrays.toString(info), LiveUserMailBoxModel.class);
|
||||||
|
} else {
|
||||||
|
empty.setVisibility(VISIBLE);
|
||||||
|
list.setVisibility(GONE);
|
||||||
|
return new ArrayList<LiveUserMailBoxModel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
empty.setVisibility(VISIBLE);
|
||||||
|
list.setVisibility(GONE);
|
||||||
|
return new ArrayList<LiveUserMailBoxModel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRefreshSuccess(List<LiveUserMailBoxModel> list, int listCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRefreshFailure() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadMoreSuccess(List<LiveUserMailBoxModel> loadItemList, int loadItemCount) {
|
||||||
|
if (loadItemList.size() > 0)
|
||||||
|
adapter.insertList(loadItemList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadMoreFailure() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
list.initData();
|
||||||
adapter.setOnItemClickListener((bean, position) -> {
|
adapter.setOnItemClickListener((bean, position) -> {
|
||||||
if (adapter.getItemCount() == 0) {
|
if (adapter.getItemCount() == 0) {
|
||||||
empty.setVisibility(VISIBLE);
|
empty.setVisibility(VISIBLE);
|
||||||
list.setVisibility(GONE);
|
list.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
adapter.setOnWebDismissListener(dialog -> initData());
|
// adapter.setOnWebDismissListener(dialog -> initData());
|
||||||
initData();
|
// initData();
|
||||||
}
|
}
|
||||||
|
|
||||||
String TAG = "信箱";
|
String TAG = "信箱";
|
||||||
|
|
||||||
void initData() {
|
void initData() {
|
||||||
LiveNetManager.get(getContext())
|
LiveNetManager.get(getContext())
|
||||||
.getContactMsg(new HttpCallback<List<LiveUserMailBoxModel>>() {
|
.getContactMsg(1, new HttpCallback<List<LiveUserMailBoxModel>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<LiveUserMailBoxModel> data) {
|
public void onSuccess(List<LiveUserMailBoxModel> data) {
|
||||||
Log.i(TAG, "onSuccess: " + data.size());
|
Log.i(TAG, "onSuccess: " + data.size());
|
||||||
|
@ -22,14 +22,12 @@ import com.opensource.svgaplayer.SVGADrawable;
|
|||||||
import com.opensource.svgaplayer.SVGAImageView;
|
import com.opensource.svgaplayer.SVGAImageView;
|
||||||
import com.opensource.svgaplayer.SVGAParser;
|
import com.opensource.svgaplayer.SVGAParser;
|
||||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
|
||||||
import com.tencent.imsdk.v2.V2TIMManager;
|
|
||||||
import com.umeng.analytics.MobclickAgent;
|
import com.umeng.analytics.MobclickAgent;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.bean.FansModel;
|
import com.yunbao.common.bean.FansModel;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.bean.OlineUserlistModel;
|
import com.yunbao.common.bean.OlineUserlistModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
@ -65,9 +63,6 @@ import java.net.URL;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.rong.imlib.IRongCoreCallback;
|
|
||||||
import io.rong.imlib.IRongCoreEnum;
|
|
||||||
import io.rong.imlib.chatroom.base.RongChatRoomClient;
|
|
||||||
import pl.droidsonroids.gif.GifImageView;
|
import pl.droidsonroids.gif.GifImageView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -415,21 +410,33 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
// textGiftWall.setText(mContext.getString(R.string.gift_wall));
|
// textGiftWall.setText(mContext.getString(R.string.gift_wall));
|
||||||
// valueGiftWall.setText(String.format(mContext.getString(R.string.has_been_lit), obj.getString("gift_wall_lighten_number")));
|
// valueGiftWall.setText(String.format(mContext.getString(R.string.has_been_lit), obj.getString("gift_wall_lighten_number")));
|
||||||
}
|
}
|
||||||
LevelBean levelBean;
|
|
||||||
if (isAnchor) {
|
if (isAnchor) {
|
||||||
levelBean = CommonAppConfig.getInstance().getAnchorLevel(mUserBean.getLevelAnchor());
|
|
||||||
userLv.setText("Lv." + mUserBean.getLevelAnchor());
|
userLv.setText("Lv." + mUserBean.getLevelAnchor());
|
||||||
mLvDesc.setText(R.string.live_user_level_anchor);
|
mLvDesc.setText(R.string.live_user_level_anchor);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
levelBean = CommonAppConfig.getInstance().getLevel(mUserBean.getLevel());
|
|
||||||
userLv.setText("Lv." + mUserBean.getLevel());
|
userLv.setText("Lv." + mUserBean.getLevel());
|
||||||
mLvDesc.setText(R.string.live_user_card_level);
|
mLvDesc.setText(R.string.live_user_card_level);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (isAnchor) {
|
if (isAnchor) {
|
||||||
ImgLoader.display2(mContext, obj.getJSONObject("level_thumb").getString("thumb"), mLiveIcon);
|
List<NewLevelModel> models = new NewLevelManager(mContext).getNewAnchorLevelModels();
|
||||||
|
int anchorLevel = 0;
|
||||||
|
|
||||||
|
|
||||||
|
anchorLevel = mUserBean.getLevelAnchor();
|
||||||
|
String imgUrl = "";
|
||||||
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getThumb();
|
||||||
|
}
|
||||||
|
}
|
||||||
mLvVal.setText(obj.getInteger("level_anchor") + "");
|
mLvVal.setText(obj.getInteger("level_anchor") + "");
|
||||||
|
ImgLoader.display2(mContext, imgUrl, mLiveIcon);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
new LiveTextRender().getLevelImage(mContext, levelBean.getLevel(), new ImgLoader.DrawableCallback() {
|
new LiveTextRender().getLevelImage(mContext, mUserBean.getLevel(), new ImgLoader.DrawableCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onLoadSuccess(Drawable drawable) {
|
public void onLoadSuccess(Drawable drawable) {
|
||||||
ImgLoader.display2(mContext, drawable, mLiveIcon);
|
ImgLoader.display2(mContext, drawable, mLiveIcon);
|
||||||
@ -441,7 +448,8 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ImgLoader.display(mContext, levelBean.getBgIcon(), mLiveIcon2);
|
|
||||||
|
|
||||||
FansModel fansMedalBean = new NewLevelManager(mContext).getFansModel(obj.getIntValue("medal_level"));
|
FansModel fansMedalBean = new NewLevelManager(mContext).getFansModel(obj.getIntValue("medal_level"));
|
||||||
if (fansMedalBean != null && !isAnchor) {
|
if (fansMedalBean != null && !isAnchor) {
|
||||||
ImgLoader.display(mContext, fansMedalBean.getThumb(), mNoble);
|
ImgLoader.display(mContext, fansMedalBean.getThumb(), mNoble);
|
||||||
|
@ -16,12 +16,13 @@ import android.widget.TextView;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.CommonIconUtil;
|
import com.yunbao.common.utils.CommonIconUtil;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
@ -31,7 +32,6 @@ import com.yunbao.live.R;
|
|||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
import com.yunbao.live.activity.LiveAnchorActivity;
|
import com.yunbao.live.activity.LiveAnchorActivity;
|
||||||
import com.yunbao.live.event.LinkMicTxMixStreamEvent;
|
import com.yunbao.live.event.LinkMicTxMixStreamEvent;
|
||||||
import com.yunbao.common.http.LiveHttpUtil;
|
|
||||||
import com.yunbao.live.interfaces.ILiveLinkMicViewHolder;
|
import com.yunbao.live.interfaces.ILiveLinkMicViewHolder;
|
||||||
import com.yunbao.live.socket.SocketClient;
|
import com.yunbao.live.socket.SocketClient;
|
||||||
import com.yunbao.live.socket.SocketLinkMicAnchorUtil;
|
import com.yunbao.live.socket.SocketLinkMicAnchorUtil;
|
||||||
@ -40,6 +40,8 @@ import com.yunbao.live.views.LiveLinkMicPlayTxViewHolder;
|
|||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/11/16.
|
* Created by cxf on 2018/11/16.
|
||||||
* 主播与主播连麦逻辑
|
* 主播与主播连麦逻辑
|
||||||
@ -174,17 +176,25 @@ public class LiveLinkMicAnchorPresenter implements View.OnClickListener {
|
|||||||
ImageView avatar = (ImageView) v.findViewById(R.id.avatar);
|
ImageView avatar = (ImageView) v.findViewById(R.id.avatar);
|
||||||
TextView name = (TextView) v.findViewById(R.id.name);
|
TextView name = (TextView) v.findViewById(R.id.name);
|
||||||
ImageView sex = (ImageView) v.findViewById(R.id.sex);
|
ImageView sex = (ImageView) v.findViewById(R.id.sex);
|
||||||
ImageView level = (ImageView) v.findViewById(R.id.level);
|
TextView level = (TextView) v.findViewById(R.id.level);
|
||||||
|
ImageView contribute = (ImageView) v.findViewById(R.id.contribute);
|
||||||
mLinkMicWaitText = v.findViewById(R.id.wait_text);
|
mLinkMicWaitText = v.findViewById(R.id.wait_text);
|
||||||
v.findViewById(R.id.btn_refuse).setOnClickListener(this);
|
v.findViewById(R.id.btn_refuse).setOnClickListener(this);
|
||||||
v.findViewById(R.id.btn_accept).setOnClickListener(this);
|
v.findViewById(R.id.btn_accept).setOnClickListener(this);
|
||||||
ImgLoader.display(mContext, u.getAvatar(), avatar);
|
ImgLoader.display(mContext, u.getAvatar(), avatar);
|
||||||
name.setText(u.getUserNiceName());
|
name.setText(u.getUserNiceName());
|
||||||
sex.setImageResource(CommonIconUtil.getSexIcon(u.getSex()));
|
sex.setImageResource(CommonIconUtil.getSexIcon(u.getSex()));
|
||||||
LevelBean levelBean = CommonAppConfig.getInstance().getAnchorLevel(u.getLevelAnchor());
|
List<NewLevelModel> models = new NewLevelManager(mContext).getNewAnchorLevelModels();
|
||||||
if (levelBean != null) {
|
int anchorLevel = 0;
|
||||||
ImgLoader.display(mContext, levelBean.getThumb(), level);
|
anchorLevel = u.getLevelAnchor();
|
||||||
|
String imgUrl = "";
|
||||||
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getThumb();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
level.setText(anchorLevel + "");
|
||||||
|
ImgLoader.display(mContext, imgUrl, contribute);
|
||||||
mLinkMicWaitCount = LINK_MIC_COUNT_MAX;
|
mLinkMicWaitCount = LINK_MIC_COUNT_MAX;
|
||||||
mLinkMicWaitText.setText(mLinkMicWaitString + "(" + mLinkMicWaitCount + ")...");
|
mLinkMicWaitText.setText(mLinkMicWaitString + "(" + mLinkMicWaitCount + ")...");
|
||||||
mLinkMicPopWindow = new PopupWindow(v, DpUtil.dp2px(280), ViewGroup.LayoutParams.WRAP_CONTENT, true);
|
mLinkMicPopWindow = new PopupWindow(v, DpUtil.dp2px(280), ViewGroup.LayoutParams.WRAP_CONTENT, true);
|
||||||
|
@ -74,7 +74,6 @@ import com.yunbao.common.bean.GiftModel;
|
|||||||
import com.yunbao.common.bean.GuardUserModel;
|
import com.yunbao.common.bean.GuardUserModel;
|
||||||
import com.yunbao.common.bean.HourRank;
|
import com.yunbao.common.bean.HourRank;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
|
||||||
import com.yunbao.common.bean.LinkMicUserBean;
|
import com.yunbao.common.bean.LinkMicUserBean;
|
||||||
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
import com.yunbao.common.bean.LiveAnchorCallMeModel;
|
||||||
import com.yunbao.common.bean.LiveAnchorSayModel;
|
import com.yunbao.common.bean.LiveAnchorSayModel;
|
||||||
@ -85,6 +84,7 @@ import com.yunbao.common.bean.LiveRoomVoteModel;
|
|||||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||||
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
import com.yunbao.common.bean.LiveUserMailBoxModel;
|
||||||
import com.yunbao.common.bean.MsgModel;
|
import com.yunbao.common.bean.MsgModel;
|
||||||
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.bean.NewPeopleTaskModel;
|
import com.yunbao.common.bean.NewPeopleTaskModel;
|
||||||
import com.yunbao.common.bean.PkRankBean;
|
import com.yunbao.common.bean.PkRankBean;
|
||||||
import com.yunbao.common.bean.RankHourModel;
|
import com.yunbao.common.bean.RankHourModel;
|
||||||
@ -114,6 +114,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
|||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.manager.RandomPkManager;
|
import com.yunbao.common.manager.RandomPkManager;
|
||||||
import com.yunbao.common.utils.AppManager;
|
import com.yunbao.common.utils.AppManager;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
@ -1202,11 +1203,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
mAvatar = (ImageView) findViewById(R.id.avatar);
|
mAvatar = (ImageView) findViewById(R.id.avatar);
|
||||||
|
|
||||||
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
|
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
|
||||||
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
|
|
||||||
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
|
|
||||||
|
|
||||||
|
|
||||||
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
|
|
||||||
mName = (TextView) findViewById(R.id.name);
|
mName = (TextView) findViewById(R.id.name);
|
||||||
mID = (TextView) findViewById(R.id.id_val);
|
mID = (TextView) findViewById(R.id.id_val);
|
||||||
mBtnFollow = findViewById(R.id.btn_follow);
|
mBtnFollow = findViewById(R.id.btn_follow);
|
||||||
@ -1826,6 +1823,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
* 重置数据
|
* 重置数据
|
||||||
*/
|
*/
|
||||||
public void resetView() {
|
public void resetView() {
|
||||||
|
contactMsgPage = -1;
|
||||||
svgaImageViewHashMap.clear();
|
svgaImageViewHashMap.clear();
|
||||||
pa_pao_layout.removeAllViews();
|
pa_pao_layout.removeAllViews();
|
||||||
timeHandler.removeCallbacks(timeRunnable);
|
timeHandler.removeCallbacks(timeRunnable);
|
||||||
@ -2855,12 +2853,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
* 显示主播等级
|
* 显示主播等级
|
||||||
*/
|
*/
|
||||||
public void setAnchorLevel(int anchorLevel) {
|
public void setAnchorLevel(int anchorLevel) {
|
||||||
if (mLevelAnchor != null) {
|
List<NewLevelModel> models = new NewLevelManager(mContext).getNewAnchorLevelModels();
|
||||||
LevelBean levelBean = CommonAppConfig.getInstance().getAnchorLevel(anchorLevel);
|
|
||||||
if (levelBean != null) {
|
String imgUrl = "";
|
||||||
ImgLoader.display2(mContext, levelBean.getThumbIcon(), mLevelAnchor);
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getIcon();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -4129,6 +4131,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clearData() {
|
public void clearData() {
|
||||||
|
contactMsgPage = -1;
|
||||||
svgaImageViewHashMap.clear();
|
svgaImageViewHashMap.clear();
|
||||||
pa_pao_layout.removeAllViews();
|
pa_pao_layout.removeAllViews();
|
||||||
timeHandler.removeCallbacks(timeRunnable);
|
timeHandler.removeCallbacks(timeRunnable);
|
||||||
@ -5532,6 +5535,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void initTopBanner() {
|
public void initTopBanner() {
|
||||||
|
contactMsgPage = 1;
|
||||||
checkNewLetter();
|
checkNewLetter();
|
||||||
if (mTopBannerList == null) {
|
if (mTopBannerList == null) {
|
||||||
mTopBannerList = new ArrayList<>();
|
mTopBannerList = new ArrayList<>();
|
||||||
@ -5733,27 +5737,39 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkNewLetter() {
|
private int contactMsgPage = 1;
|
||||||
LiveNetManager.get(mContext).getContactMsg(new com.yunbao.common.http.base.HttpCallback<List<LiveUserMailBoxModel>>() {
|
|
||||||
|
private synchronized void checkNewLetter() {
|
||||||
|
if (contactMsgPage > 0) {
|
||||||
|
LiveNetManager.get(mContext).getContactMsg(contactMsgPage, new com.yunbao.common.http.base.HttpCallback<List<LiveUserMailBoxModel>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<LiveUserMailBoxModel> data) {
|
public void onSuccess(List<LiveUserMailBoxModel> data) {
|
||||||
|
if (data.size() > 0 && data != null) {
|
||||||
for (LiveUserMailBoxModel model : data) {
|
for (LiveUserMailBoxModel model : data) {
|
||||||
if (model.getIsRead() == 0 && mContext instanceof LiveAudienceActivity) {
|
if (model.getIsRead() == 0 && mContext instanceof LiveAudienceActivity) {
|
||||||
((LiveAudienceActivity) mContext).showMsgRed(0);
|
((LiveAudienceActivity) mContext).showMsgRed(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
contactMsgPage = contactMsgPage + 1;
|
||||||
|
checkNewLetter();
|
||||||
|
} else {
|
||||||
((LiveAudienceActivity) mContext).showMsgRed(-1);
|
((LiveAudienceActivity) mContext).showMsgRed(-1);
|
||||||
|
contactMsgPage = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
|
contactMsgPage = 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void blindBoxAllServerNotify(AllServerNotifyEvent event) {
|
public void blindBoxAllServerNotify(AllServerNotifyEvent event) {
|
||||||
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
LiveReceiveGiftBean receiveGiftBean = new LiveReceiveGiftBean();
|
||||||
receiveGiftBean.setBlindBox(true);
|
receiveGiftBean.setBlindBox(true);
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="280dp"
|
android:layout_width="280dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_dialog_2"
|
android:background="@drawable/bg_dialog_2"
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
>
|
|
||||||
|
|
||||||
<com.makeramen.roundedimageview.RoundedImageView
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
@ -15,8 +13,7 @@
|
|||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="15dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:riv_oval="true"
|
app:riv_oval="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
@ -24,48 +21,56 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="15dp"
|
android:layout_height="15dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal">
|
||||||
>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/sex"
|
android:id="@+id/sex"
|
||||||
android:layout_width="18dp"
|
android:layout_width="18dp"
|
||||||
android:layout_height="15dp"
|
android:layout_height="15dp" />
|
||||||
/>
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="19dp">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level"
|
android:id="@+id/contribute"
|
||||||
android:layout_width="30dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="15dp"
|
android:layout_height="19dp" />
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
/>
|
<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:textColor="@color/white"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/wait_text"
|
android:id="@+id/wait_text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
android:textColor="@color/textColor2"
|
android:textColor="@color/textColor2"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
<View style="@style/line2" />
|
||||||
style="@style/line2"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp">
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_refuse"
|
android:id="@+id/btn_refuse"
|
||||||
@ -75,14 +80,12 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/refuse"
|
android:text="@string/refuse"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/gray2"
|
android:background="@color/gray2" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_accept"
|
android:id="@+id/btn_accept"
|
||||||
@ -92,8 +95,7 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/accept"
|
android:text="@string/accept"
|
||||||
android:textColor="@color/global"
|
android:textColor="@color/global"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -237,7 +237,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:visibility="gone">
|
android:visibility="visible">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<com.yunbao.common.custom.CommonRefreshView
|
||||||
android:id="@+id/mailbox"
|
android:id="@+id/mailbox"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="328dp"
|
android:layout_height="328dp"
|
||||||
@ -40,7 +40,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/bg_top"
|
app:layout_constraintTop_toBottomOf="@+id/bg_top"
|
||||||
tools:listitem="@layout/item_live_user_mailbox">
|
tools:listitem="@layout/item_live_user_mailbox">
|
||||||
|
|
||||||
</androidx.recyclerview.widget.RecyclerView>
|
</com.yunbao.common.custom.CommonRefreshView>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/ic_empty"
|
android:id="@+id/ic_empty"
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:paddingLeft="12dp"
|
android:paddingLeft="12dp"
|
||||||
android:paddingRight="12dp"
|
android:paddingRight="12dp">
|
||||||
>
|
|
||||||
|
|
||||||
<com.makeramen.roundedimageview.RoundedImageView
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
@ -14,8 +12,7 @@
|
|||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:riv_oval="true"
|
app:riv_oval="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
@ -25,8 +22,7 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_toRightOf="@id/avatar"
|
android:layout_toRightOf="@id/avatar"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/sex"
|
android:id="@+id/sex"
|
||||||
@ -34,17 +30,32 @@
|
|||||||
android:layout_height="15dp"
|
android:layout_height="15dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_toRightOf="@id/name"
|
android:layout_toRightOf="@id/name" />
|
||||||
/>
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="19dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:layout_toRightOf="@id/sex">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level"
|
android:id="@+id/level"
|
||||||
android:layout_width="30dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="15dp"
|
android:layout_height="19dp" />
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_marginLeft="5dp"
|
<TextView
|
||||||
android:layout_toRightOf="@id/sex"
|
android:id="@+id/leave"
|
||||||
/>
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="28dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_invite"
|
android:id="@+id/btn_invite"
|
||||||
@ -55,11 +66,9 @@
|
|||||||
android:background="@drawable/bg_btn_live_pk"
|
android:background="@drawable/bg_btn_live_pk"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/fg_btn_live_pk"
|
android:textColor="@color/fg_btn_live_pk"
|
||||||
android:textSize="10sp"
|
android:textSize="10sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style="@style/line2"
|
style="@style/line2"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true" />
|
||||||
/>
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@ -43,6 +43,7 @@
|
|||||||
android:id="@+id/level_anchor"
|
android:id="@+id/level_anchor"
|
||||||
android:layout_width="13dp"
|
android:layout_width="13dp"
|
||||||
android:layout_height="13dp"
|
android:layout_height="13dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentBottom="true" />
|
android:layout_alignParentBottom="true" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -239,15 +239,15 @@ public class MainListAdapter extends RefreshAdapter<ListBean> {
|
|||||||
|
|
||||||
mVotes.setText(bean.getTotalCoinFormat() + " ");
|
mVotes.setText(bean.getTotalCoinFormat() + " ");
|
||||||
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||||
LevelBean levelBean = null;
|
// LevelBean levelBean = null;
|
||||||
if (mType == TYPE_PROFIT) {
|
// if (mType == TYPE_PROFIT) {
|
||||||
levelBean = CommonAppConfig.getInstance().getAnchorLevel(bean.getLevelAnchor());
|
// levelBean = CommonAppConfig.getInstance().getAnchorLevel(bean.getLevelAnchor());
|
||||||
} else {
|
// } else {
|
||||||
levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
// levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||||
}
|
// }
|
||||||
if (levelBean != null) {
|
// if (levelBean != null) {
|
||||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
// ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
liveing.setVisibility(View.INVISIBLE);
|
liveing.setVisibility(View.INVISIBLE);
|
||||||
if (bean.getIslive() == 1) {
|
if (bean.getIslive() == 1) {
|
||||||
|
@ -16,15 +16,17 @@ import com.yunbao.common.Constants;
|
|||||||
import com.yunbao.common.adapter.RefreshAdapter;
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
import com.yunbao.common.bean.LevelBean;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.custom.MyRadioButton;
|
import com.yunbao.common.custom.MyRadioButton;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.CommonIconUtil;
|
import com.yunbao.common.utils.CommonIconUtil;
|
||||||
|
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.live.bean.SearchUserBean;
|
import com.yunbao.live.bean.SearchUserBean;
|
||||||
import com.yunbao.common.http.LiveHttpUtil;
|
|
||||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -117,7 +119,7 @@ public class SearchAdapter extends RefreshAdapter<SearchUserBean> {
|
|||||||
class Vh extends RecyclerView.ViewHolder {
|
class Vh extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
ImageView mAvatar;
|
ImageView mAvatar;
|
||||||
TextView mName;
|
TextView mName, leave;
|
||||||
TextView mSign;
|
TextView mSign;
|
||||||
ImageView mSex;
|
ImageView mSex;
|
||||||
ImageView mLevelAnchor;
|
ImageView mLevelAnchor;
|
||||||
@ -130,6 +132,7 @@ public class SearchAdapter extends RefreshAdapter<SearchUserBean> {
|
|||||||
mAvatar = (ImageView) itemView.findViewById(R.id.avatar);
|
mAvatar = (ImageView) itemView.findViewById(R.id.avatar);
|
||||||
mName = (TextView) itemView.findViewById(R.id.name);
|
mName = (TextView) itemView.findViewById(R.id.name);
|
||||||
mSign = (TextView) itemView.findViewById(R.id.sign);
|
mSign = (TextView) itemView.findViewById(R.id.sign);
|
||||||
|
leave = (TextView) itemView.findViewById(R.id.leave);
|
||||||
mSex = (ImageView) itemView.findViewById(R.id.sex);
|
mSex = (ImageView) itemView.findViewById(R.id.sex);
|
||||||
mLevelAnchor = (ImageView) itemView.findViewById(R.id.level_anchor);
|
mLevelAnchor = (ImageView) itemView.findViewById(R.id.level_anchor);
|
||||||
mLevel = (ImageView) itemView.findViewById(R.id.level);
|
mLevel = (ImageView) itemView.findViewById(R.id.level);
|
||||||
@ -158,31 +161,24 @@ public class SearchAdapter extends RefreshAdapter<SearchUserBean> {
|
|||||||
gotoLive(bean.getId());
|
gotoLive(bean.getId());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
LevelBean anchorLevelBean = CommonAppConfig.getInstance().getAnchorLevel(bean.getLevelAnchor());
|
List<NewLevelModel> models = new NewLevelManager(itemView.getContext()).getNewAnchorLevelModels();
|
||||||
if (anchorLevelBean != null) {
|
int anchorLevel = 0;
|
||||||
ImgLoader.display(mContext, CommonAppConfig.getInstance().HOST + anchorLevelBean.getThumb(), mLevelAnchor);
|
anchorLevel = bean.getLevelAnchor();
|
||||||
|
String imgUrl = "";
|
||||||
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getThumb();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
leave.setText(bean.getLevelAnchor() + "");
|
||||||
|
ImgLoader.display(itemView.getContext(), imgUrl, mLevelAnchor);
|
||||||
|
|
||||||
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||||
if (levelBean != null) {
|
if (levelBean != null) {
|
||||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (mUid.equals(bean.getId())) {
|
|
||||||
// if (mBtnFollow.getVisibility() == View.VISIBLE) {
|
|
||||||
// mBtnFollow.setVisibility(View.INVISIBLE);
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// if (mBtnFollow.getVisibility() != View.VISIBLE) {
|
|
||||||
// mBtnFollow.setVisibility(View.VISIBLE);
|
|
||||||
// }
|
|
||||||
// if (bean.getAttention() == 1) {
|
|
||||||
// mBtnFollow.doChecked(true);
|
|
||||||
// mBtnFollow.setText(mFollowing);
|
|
||||||
// } else {
|
|
||||||
// mBtnFollow.doChecked(false);
|
|
||||||
// mBtnFollow.setText(mFollow);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,15 +2,10 @@ package com.yunbao.main.dialog;
|
|||||||
|
|
||||||
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
import static com.yunbao.common.utils.RouteUtil.PATH_COIN;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -21,10 +16,15 @@ import android.widget.ImageView;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
|
import com.yunbao.common.custom.CommonRefreshView;
|
||||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
@ -32,6 +32,7 @@ import com.yunbao.common.utils.DialogUitl;
|
|||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
|
import com.yunbao.main.adapter.MainHomeRemFollLiveAdapter;
|
||||||
import com.yunbao.main.bean.EncourageGiftBean;
|
import com.yunbao.main.bean.EncourageGiftBean;
|
||||||
import com.yunbao.main.http.MainHttpUtil;
|
import com.yunbao.main.http.MainHttpUtil;
|
||||||
|
|
||||||
@ -46,7 +47,7 @@ public class EncourageDialog extends AbsDialogFragment implements View.OnClickLi
|
|||||||
private View v_encourage, v_encourage_list, v_close;
|
private View v_encourage, v_encourage_list, v_close;
|
||||||
private ImageView img_gift1, img_gift2, img_gift3;
|
private ImageView img_gift1, img_gift2, img_gift3;
|
||||||
private LinearLayout lt_gift1, lt_gift2, lt_gift3, lt_lt1, lt_lt2, lt_no_data;
|
private LinearLayout lt_gift1, lt_gift2, lt_gift3, lt_lt1, lt_lt2, lt_no_data;
|
||||||
private RecyclerView rc_encourage;
|
private CommonRefreshView rc_encourage;
|
||||||
private EncourageAdapter encourageAdapter;
|
private EncourageAdapter encourageAdapter;
|
||||||
private List<EncourageGiftBean> encourageList;
|
private List<EncourageGiftBean> encourageList;
|
||||||
private List<EncourageGiftBean> encourageList2;
|
private List<EncourageGiftBean> encourageList2;
|
||||||
@ -151,30 +152,68 @@ public class EncourageDialog extends AbsDialogFragment implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void getDataList() {
|
private void getDataList() {
|
||||||
MainHttpUtil.getDynamicSendGiftList(id, new HttpCallback() {
|
gridLayoutManager = new GridLayoutManager(getContext(), 1);
|
||||||
|
rc_encourage.setLayoutManager(gridLayoutManager);
|
||||||
|
lt_no_data.setVisibility(View.GONE);
|
||||||
|
rc_encourage.setVisibility(View.VISIBLE);
|
||||||
|
rc_encourage.setDataHelper(new CommonRefreshView.DataHelper<EncourageGiftBean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public RefreshAdapter<EncourageGiftBean> getAdapter() {
|
||||||
|
if (encourageAdapter == null) {
|
||||||
|
encourageAdapter = new EncourageAdapter(mContext);
|
||||||
|
}
|
||||||
|
return encourageAdapter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadData(int p, HttpCallback callback) {
|
||||||
|
MainHttpUtil.getDynamicSendGiftList(id, p, callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EncourageGiftBean> processData(String[] info) {
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
if (info.length > 0) {
|
if (info.length > 0) {
|
||||||
lt_no_data.setVisibility(View.GONE);
|
lt_no_data.setVisibility(View.GONE);
|
||||||
rc_encourage.setVisibility(View.VISIBLE);
|
rc_encourage.setVisibility(View.VISIBLE);
|
||||||
encourageList = JSON.parseArray(Arrays.toString(info), EncourageGiftBean.class);
|
return JSON.parseArray(Arrays.toString(info), EncourageGiftBean.class);
|
||||||
|
} else {
|
||||||
|
lt_no_data.setVisibility(View.VISIBLE);
|
||||||
|
rc_encourage.setVisibility(View.GONE);
|
||||||
|
return new ArrayList<EncourageGiftBean>();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
lt_no_data.setVisibility(View.VISIBLE);
|
||||||
|
rc_encourage.setVisibility(View.GONE);
|
||||||
|
return new ArrayList<EncourageGiftBean>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
encourageAdapter = new EncourageAdapter(getContext(), encourageList);
|
|
||||||
gridLayoutManager = new GridLayoutManager(getContext(), 1);
|
|
||||||
rc_encourage.setLayoutManager(gridLayoutManager);
|
|
||||||
rc_encourage.setAdapter(encourageAdapter);
|
|
||||||
} else {
|
|
||||||
lt_no_data.setVisibility(View.VISIBLE);
|
|
||||||
rc_encourage.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
lt_no_data.setVisibility(View.VISIBLE);
|
@Override
|
||||||
rc_encourage.setVisibility(View.GONE);
|
public void onRefreshSuccess(List<EncourageGiftBean> list, int listCount) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRefreshFailure() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadMoreSuccess(List<EncourageGiftBean> loadItemList, int loadItemCount) {
|
||||||
|
if (loadItemList.size() > 0)
|
||||||
|
encourageAdapter.insertList(loadItemList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadMoreFailure() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rc_encourage.initData();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
@ -193,7 +232,7 @@ public class EncourageDialog extends AbsDialogFragment implements View.OnClickLi
|
|||||||
lt_gift3 = (LinearLayout) findViewById(R.id.lt_gift3);
|
lt_gift3 = (LinearLayout) findViewById(R.id.lt_gift3);
|
||||||
lt_lt1 = (LinearLayout) findViewById(R.id.lt_lt1);
|
lt_lt1 = (LinearLayout) findViewById(R.id.lt_lt1);
|
||||||
lt_lt2 = (LinearLayout) findViewById(R.id.lt_lt2);
|
lt_lt2 = (LinearLayout) findViewById(R.id.lt_lt2);
|
||||||
rc_encourage = (RecyclerView) findViewById(R.id.rc_encourage);
|
rc_encourage = (CommonRefreshView) findViewById(R.id.rc_encourage);
|
||||||
|
|
||||||
img_gift1 = (ImageView) findViewById(R.id.img_gift1);
|
img_gift1 = (ImageView) findViewById(R.id.img_gift1);
|
||||||
img_gift2 = (ImageView) findViewById(R.id.img_gift2);
|
img_gift2 = (ImageView) findViewById(R.id.img_gift2);
|
||||||
@ -344,16 +383,10 @@ public class EncourageDialog extends AbsDialogFragment implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EncourageAdapter extends RecyclerView.Adapter<EncourageAdapter.ViewHolder> {
|
public class EncourageAdapter extends RefreshAdapter<EncourageGiftBean> {
|
||||||
private LayoutInflater mInflater;
|
|
||||||
private List<EncourageGiftBean> mDatas;
|
|
||||||
|
|
||||||
/**
|
public EncourageAdapter(Context context) {
|
||||||
*
|
super(context);
|
||||||
*/
|
|
||||||
public EncourageAdapter(Context context, List<EncourageGiftBean> datats) {
|
|
||||||
mInflater = LayoutInflater.from(context);
|
|
||||||
mDatas = datats;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
@ -374,43 +407,24 @@ public class EncourageDialog extends AbsDialogFragment implements View.OnClickLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return mDatas.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建ViewHolder
|
* 创建ViewHolder
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public EncourageAdapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
public EncourageAdapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
|
||||||
View view;
|
|
||||||
view = mInflater.inflate(R.layout.item_encourage_list,
|
|
||||||
viewGroup, false);
|
|
||||||
|
|
||||||
EncourageAdapter.ViewHolder viewHolder = new EncourageAdapter.ViewHolder(view);
|
return new EncourageAdapter.ViewHolder(mInflater.inflate(R.layout.item_encourage_list, viewGroup, false));
|
||||||
|
|
||||||
return viewHolder;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置值
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(final EncourageAdapter.ViewHolder viewHolder, @SuppressLint("RecyclerView") final int position) {
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
ImgLoader.displayAvatar(mContext, mDatas.get(position).getUser_avatar(), viewHolder.avatar);
|
ViewHolder viewHolder = (ViewHolder) holder;
|
||||||
// LevelBean anchorLevelBean = CommonAppConfig.getInstance().getAnchorLevel(mDatas.getLevelAnchor());
|
ImgLoader.displayAvatar(mContext, mList.get(position).getUser_avatar(), viewHolder.avatar);
|
||||||
// if (anchorLevelBean != null) {
|
ImgLoader.display(mContext, mList.get(position).getGift_img(), viewHolder.tv_gift_pic);
|
||||||
// ImgLoader.display(mContext, CommonAppConfig.getInstance().HOST + anchorLevelBean.getThumb(), viewHolder.level_anchor);
|
viewHolder.name.setText(mList.get(position).getUser_name());
|
||||||
// }
|
viewHolder.tv_gift_num.setText(mList.get(position).getGift_num());
|
||||||
// LevelBean levelBean = CommonAppConfig.getInstance().getLevel(mDatas.getLevel());
|
|
||||||
// if (levelBean != null) {
|
|
||||||
// ImgLoader.display(mContext, levelBean.getThumb(), viewHolder.level);
|
|
||||||
// }
|
|
||||||
ImgLoader.display(mContext, mDatas.get(position).getGift_img(), viewHolder.tv_gift_pic);
|
|
||||||
viewHolder.name.setText(mDatas.get(position).getUser_name());
|
|
||||||
viewHolder.tv_gift_num.setText(mDatas.get(position).getGift_num());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -692,12 +692,15 @@ public class MainHttpUtil {
|
|||||||
/**
|
/**
|
||||||
* 社区动态礼物信息列表
|
* 社区动态礼物信息列表
|
||||||
*/
|
*/
|
||||||
public static void getDynamicSendGiftList(String id, HttpCallback callback) {
|
public static void getDynamicSendGiftList(String id, int page, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Community.getDynamicSendGiftList", MainHttpConsts.GET_DYNAMICSENDGIFTLIST)
|
HttpClient.getInstance().get("Community.getDynamicSendGiftList", MainHttpConsts.GET_DYNAMICSENDGIFTLIST)
|
||||||
.params("dynamic_id", id)
|
.params("dynamic_id", id)
|
||||||
|
.params("page", page)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是主播
|
* 是否是主播
|
||||||
*/
|
*/
|
||||||
|
@ -326,7 +326,6 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
|||||||
}
|
}
|
||||||
signature.setText(singnature);
|
signature.setText(singnature);
|
||||||
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
||||||
LevelBean anchorLevelBean = appConfig.getAnchorLevel(u.getLevelAnchor());
|
|
||||||
|
|
||||||
if (u.getDress().getAvatar_frame() != null) {
|
if (u.getDress().getAvatar_frame() != null) {
|
||||||
if (u.getDress().getAvatar_frame().contains("svga")) {
|
if (u.getDress().getAvatar_frame().contains("svga")) {
|
||||||
@ -360,8 +359,8 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
|||||||
if ("C".equals(u.getUsers_type())) {
|
if ("C".equals(u.getUsers_type())) {
|
||||||
Constants.isAnchor = true;
|
Constants.isAnchor = true;
|
||||||
good_nub_ico.setImageResource(R.mipmap.usercard_good_nub);
|
good_nub_ico.setImageResource(R.mipmap.usercard_good_nub);
|
||||||
if (anchorLevelBean != null) {
|
|
||||||
ImgLoader.display(mContext, CommonAppConfig.getInstance().HOST + anchorLevelBean.getThumb(), mLevel);
|
|
||||||
ImgLoader.display(mContext, R.mipmap.icon_zhubolv, img_lv_pic);
|
ImgLoader.display(mContext, R.mipmap.icon_zhubolv, img_lv_pic);
|
||||||
//主播等级
|
//主播等级
|
||||||
tv_level.setOnClickListener(new View.OnClickListener() {
|
tv_level.setOnClickListener(new View.OnClickListener() {
|
||||||
@ -372,8 +371,8 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
|||||||
ZhuangBanActivity.forward(mContext, url);
|
ZhuangBanActivity.forward(mContext, url);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
tv_level.setText(anchorLevelBean.getLevel() + "");
|
tv_level.setText(u.getLevel() + "");
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Constants.isAnchor = false;
|
Constants.isAnchor = false;
|
||||||
LevelBean levelBean = appConfig.getLevel(u.getLevel());
|
LevelBean levelBean = appConfig.getLevel(u.getLevel());
|
||||||
|
@ -23,11 +23,13 @@ import com.yunbao.common.Constants;
|
|||||||
import com.yunbao.common.activity.WebViewActivity;
|
import com.yunbao.common.activity.WebViewActivity;
|
||||||
import com.yunbao.common.bean.GoogleBean;
|
import com.yunbao.common.bean.GoogleBean;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
import com.yunbao.common.bean.LevelBean;
|
||||||
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.bean.UserItemBean;
|
import com.yunbao.common.bean.UserItemBean;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.SVGAViewUtils;
|
import com.yunbao.common.utils.SVGAViewUtils;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
@ -77,7 +79,7 @@ public class MainMeViewHolder1 extends AbsMainViewHolder implements OnItemClickL
|
|||||||
private View v_noble;
|
private View v_noble;
|
||||||
// private LinearLayout btnUserNoble;
|
// private LinearLayout btnUserNoble;
|
||||||
private ImageView user_noble_ico, good_nub_ico;
|
private ImageView user_noble_ico, good_nub_ico;
|
||||||
private TextView user_noble_text;
|
private TextView user_noble_text,leave;
|
||||||
private UserItemBean beanStetting = null, beanKefu = null;
|
private UserItemBean beanStetting = null, beanKefu = null;
|
||||||
private boolean firstInto = true;
|
private boolean firstInto = true;
|
||||||
|
|
||||||
@ -124,6 +126,7 @@ public class MainMeViewHolder1 extends AbsMainViewHolder implements OnItemClickL
|
|||||||
btnCopy = (TextView) findViewById(R.id.btn_copy);
|
btnCopy = (TextView) findViewById(R.id.btn_copy);
|
||||||
// btnUserNoble = (LinearLayout) findViewById(R.id.btn_user_noble);
|
// btnUserNoble = (LinearLayout) findViewById(R.id.btn_user_noble);
|
||||||
user_noble_text = (TextView) findViewById(R.id.user_noble_text);
|
user_noble_text = (TextView) findViewById(R.id.user_noble_text);
|
||||||
|
leave = (TextView) findViewById(R.id.leave);
|
||||||
|
|
||||||
img_kefu = (ImageView) findViewById(R.id.img_kefu);
|
img_kefu = (ImageView) findViewById(R.id.img_kefu);
|
||||||
img_setting = (ImageView) findViewById(R.id.img_setting);
|
img_setting = (ImageView) findViewById(R.id.img_setting);
|
||||||
@ -258,7 +261,7 @@ public class MainMeViewHolder1 extends AbsMainViewHolder implements OnItemClickL
|
|||||||
gold.setText(u.getCoin());
|
gold.setText(u.getCoin());
|
||||||
signature.setText(u.getSignature());
|
signature.setText(u.getSignature());
|
||||||
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
||||||
LevelBean anchorLevelBean = appConfig.getAnchorLevel(u.getLevelAnchor());
|
|
||||||
|
|
||||||
if (u.getDress().getAvatar_frame() != null) {
|
if (u.getDress().getAvatar_frame() != null) {
|
||||||
if (u.getDress().getAvatar_frame().contains("svga")) {
|
if (u.getDress().getAvatar_frame().contains("svga")) {
|
||||||
@ -290,9 +293,20 @@ public class MainMeViewHolder1 extends AbsMainViewHolder implements OnItemClickL
|
|||||||
user_noble_ico.setImageResource(R.mipmap.df_nobe);
|
user_noble_ico.setImageResource(R.mipmap.df_nobe);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (anchorLevelBean != null) {
|
List<NewLevelModel> models = new NewLevelManager(mContext).getNewAnchorLevelModels();
|
||||||
ImgLoader.display(mContext, CommonAppConfig.getInstance().HOST + anchorLevelBean.getThumb(), mLevelAnchor);
|
int anchorLevel = 0;
|
||||||
|
|
||||||
|
|
||||||
|
anchorLevel = u.getLevelAnchor();
|
||||||
|
String imgUrl = "";
|
||||||
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getThumb();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
leave.setText(String.valueOf(u.getLevelAnchor()));
|
||||||
|
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||||
|
|
||||||
LevelBean levelBean = appConfig.getLevel(u.getLevel());
|
LevelBean levelBean = appConfig.getLevel(u.getLevel());
|
||||||
if (levelBean != null) {
|
if (levelBean != null) {
|
||||||
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||||
|
@ -4,9 +4,6 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import com.google.android.material.appbar.AppBarLayout;
|
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
import androidx.viewpager.widget.ViewPager;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -16,24 +13,29 @@ import android.widget.ImageView;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.google.android.material.appbar.AppBarLayout;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.activity.AbsActivity;
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
import com.yunbao.common.adapter.ViewPagerAdapter;
|
import com.yunbao.common.adapter.ViewPagerAdapter;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
import com.yunbao.common.bean.LevelBean;
|
||||||
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.event.FollowEvent;
|
import com.yunbao.common.event.FollowEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpConsts;
|
import com.yunbao.common.http.CommonHttpConsts;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.CommonIconUtil;
|
import com.yunbao.common.utils.CommonIconUtil;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.live.activity.LiveContributeActivity;
|
import com.yunbao.live.activity.LiveContributeActivity;
|
||||||
import com.yunbao.live.activity.LiveGuardListActivity;
|
import com.yunbao.live.activity.LiveGuardListActivity;
|
||||||
import com.yunbao.live.activity.SystemMessageActivity;
|
import com.yunbao.live.activity.SystemMessageActivity;
|
||||||
@ -87,7 +89,7 @@ public class UserHomeViewHolder extends AbsLivePageViewHolder implements AppBarL
|
|||||||
private AppBarLayout mAppBarLayout;
|
private AppBarLayout mAppBarLayout;
|
||||||
private ImageView mAvatarBg;
|
private ImageView mAvatarBg;
|
||||||
private ImageView mAvatar;
|
private ImageView mAvatar;
|
||||||
private TextView mName;
|
private TextView mName, leave;
|
||||||
private ImageView mSex;
|
private ImageView mSex;
|
||||||
private ImageView mLevelAnchor;
|
private ImageView mLevelAnchor;
|
||||||
private ImageView mLevel;
|
private ImageView mLevel;
|
||||||
@ -158,6 +160,7 @@ public class UserHomeViewHolder extends AbsLivePageViewHolder implements AppBarL
|
|||||||
mAvatarBg = (ImageView) findViewById(R.id.bg_avatar);
|
mAvatarBg = (ImageView) findViewById(R.id.bg_avatar);
|
||||||
mAvatar = (ImageView) findViewById(R.id.avatar);
|
mAvatar = (ImageView) findViewById(R.id.avatar);
|
||||||
mName = (TextView) findViewById(R.id.name);
|
mName = (TextView) findViewById(R.id.name);
|
||||||
|
leave = (TextView) findViewById(R.id.leave);
|
||||||
mSex = (ImageView) findViewById(R.id.sex);
|
mSex = (ImageView) findViewById(R.id.sex);
|
||||||
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
|
mLevelAnchor = (ImageView) findViewById(R.id.level_anchor);
|
||||||
mLevel = (ImageView) findViewById(R.id.level);
|
mLevel = (ImageView) findViewById(R.id.level);
|
||||||
@ -354,8 +357,19 @@ public class UserHomeViewHolder extends AbsLivePageViewHolder implements AppBarL
|
|||||||
mTitleView.setText(toName);
|
mTitleView.setText(toName);
|
||||||
mSex.setImageResource(CommonIconUtil.getSexIcon(userBean.getSex()));
|
mSex.setImageResource(CommonIconUtil.getSexIcon(userBean.getSex()));
|
||||||
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
||||||
LevelBean levelAnchor = appConfig.getAnchorLevel(userBean.getLevelAnchor());
|
List<NewLevelModel> models = new NewLevelManager(mContext).getNewAnchorLevelModels();
|
||||||
ImgLoader.display(mContext, levelAnchor.getThumb(), mLevelAnchor);
|
int anchorLevel = 0;
|
||||||
|
anchorLevel = userBean.getLevelAnchor();
|
||||||
|
String imgUrl = "";
|
||||||
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getThumb();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
leave.setText(String.valueOf(anchorLevel));
|
||||||
|
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||||
|
|
||||||
|
|
||||||
LevelBean level = appConfig.getLevel(userBean.getLevel());
|
LevelBean level = appConfig.getLevel(userBean.getLevel());
|
||||||
ImgLoader.display(mContext, level.getThumb(), mLevel);
|
ImgLoader.display(mContext, level.getThumb(), mLevel);
|
||||||
|
|
||||||
|
@ -35,15 +35,21 @@ import com.yunbao.common.adapter.ViewPagerAdapter;
|
|||||||
import com.yunbao.common.bean.ConfigBean;
|
import com.yunbao.common.bean.ConfigBean;
|
||||||
import com.yunbao.common.bean.LevelBean;
|
import com.yunbao.common.bean.LevelBean;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.bean.NewLevelModel;
|
||||||
import com.yunbao.common.event.FollowEvent;
|
import com.yunbao.common.event.FollowEvent;
|
||||||
|
import com.yunbao.common.event.LiveRoomChangeEvent;
|
||||||
import com.yunbao.common.event.UpdateFieldEvent;
|
import com.yunbao.common.event.UpdateFieldEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpConsts;
|
import com.yunbao.common.http.CommonHttpConsts;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.http.LiveHttpConsts;
|
||||||
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.CommonIconUtil;
|
import com.yunbao.common.utils.CommonIconUtil;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
|
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||||
import com.yunbao.common.utils.MicStatusManager;
|
import com.yunbao.common.utils.MicStatusManager;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.SVGAViewUtils;
|
import com.yunbao.common.utils.SVGAViewUtils;
|
||||||
@ -52,10 +58,6 @@ import com.yunbao.common.utils.ToastUtil;
|
|||||||
import com.yunbao.live.activity.LiveReportActivity;
|
import com.yunbao.live.activity.LiveReportActivity;
|
||||||
import com.yunbao.live.bean.SearchUserBean;
|
import com.yunbao.live.bean.SearchUserBean;
|
||||||
import com.yunbao.live.dialog.LiveShareDialogFragment;
|
import com.yunbao.live.dialog.LiveShareDialogFragment;
|
||||||
import com.yunbao.common.event.LiveRoomChangeEvent;
|
|
||||||
import com.yunbao.common.http.LiveHttpConsts;
|
|
||||||
import com.yunbao.common.http.LiveHttpUtil;
|
|
||||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
|
||||||
import com.yunbao.live.presenter.UserHomeSharePresenter;
|
import com.yunbao.live.presenter.UserHomeSharePresenter;
|
||||||
import com.yunbao.live.views.AbsLivePageViewHolder;
|
import com.yunbao.live.views.AbsLivePageViewHolder;
|
||||||
import com.yunbao.live.views.AbsUserHomeViewHolder;
|
import com.yunbao.live.views.AbsUserHomeViewHolder;
|
||||||
@ -112,7 +114,7 @@ public class UserHomeViewHolder2 extends AbsLivePageViewHolder implements LiveSh
|
|||||||
private ImageView mLevel;
|
private ImageView mLevel;
|
||||||
private TextView mID;
|
private TextView mID;
|
||||||
private View mBtnLive;
|
private View mBtnLive;
|
||||||
private TextView mBtnFans;
|
private TextView mBtnFans , leave;;
|
||||||
private TextView mBtnFollow;
|
private TextView mBtnFollow;
|
||||||
private ImageView mFollowImage;
|
private ImageView mFollowImage;
|
||||||
private int isblack;
|
private int isblack;
|
||||||
@ -266,6 +268,7 @@ public class UserHomeViewHolder2 extends AbsLivePageViewHolder implements LiveSh
|
|||||||
mID = (TextView) findViewById(R.id.id_val);
|
mID = (TextView) findViewById(R.id.id_val);
|
||||||
good_nub_ico = (ImageView) findViewById(R.id.good_nub_ico);
|
good_nub_ico = (ImageView) findViewById(R.id.good_nub_ico);
|
||||||
mBtnFans = (TextView) findViewById(R.id.btn_fans);
|
mBtnFans = (TextView) findViewById(R.id.btn_fans);
|
||||||
|
leave = (TextView) findViewById(R.id.leave);
|
||||||
mBtnFollow = (TextView) findViewById(R.id.btn_follow);
|
mBtnFollow = (TextView) findViewById(R.id.btn_follow);
|
||||||
gift_svga = (SVGAImageView) findViewById(com.yunbao.live.R.id.gift_svga);
|
gift_svga = (SVGAImageView) findViewById(com.yunbao.live.R.id.gift_svga);
|
||||||
mAvatar = (ImageView) findViewById(R.id.avatar);
|
mAvatar = (ImageView) findViewById(R.id.avatar);
|
||||||
@ -500,9 +503,20 @@ public class UserHomeViewHolder2 extends AbsLivePageViewHolder implements LiveSh
|
|||||||
mName.setText(toName);
|
mName.setText(toName);
|
||||||
mSex.setImageResource(CommonIconUtil.getSexIcon(userBean.getSex()));
|
mSex.setImageResource(CommonIconUtil.getSexIcon(userBean.getSex()));
|
||||||
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
||||||
LevelBean levelAnchor = appConfig.getAnchorLevel(userBean.getLevelAnchor());
|
|
||||||
Log.i("Tag", CommonAppConfig.getInstance().HOST + levelAnchor.getThumb());
|
List<NewLevelModel> models = new NewLevelManager(mContext).getNewAnchorLevelModels();
|
||||||
ImgLoader.display(mContext, CommonAppConfig.getInstance().HOST + levelAnchor.getThumb(), mLevelAnchor);
|
int anchorLevel = 0;
|
||||||
|
|
||||||
|
anchorLevel = userBean.getLevelAnchor();
|
||||||
|
String imgUrl = "";
|
||||||
|
for (NewLevelModel newLevelModel : models) {
|
||||||
|
if (newLevelModel.getLeveMin() <= anchorLevel && anchorLevel <= newLevelModel.getLeveMax()) {
|
||||||
|
imgUrl = newLevelModel.getThumb();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
leave.setText(String.valueOf(userBean.getLevelAnchor()));
|
||||||
|
ImgLoader.display(mContext, imgUrl, mLevelAnchor);
|
||||||
|
|
||||||
LevelBean level = appConfig.getLevel(userBean.getLevel());
|
LevelBean level = appConfig.getLevel(userBean.getLevel());
|
||||||
ImgLoader.display(mContext, level.getThumb(), mLevel);
|
ImgLoader.display(mContext, level.getThumb(), mLevel);
|
||||||
//修改靓号图标 个人中心子页面
|
//修改靓号图标 个人中心子页面
|
||||||
|
@ -406,7 +406,7 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="visible">
|
android:visibility="visible">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<com.yunbao.common.custom.CommonRefreshView
|
||||||
android:id="@+id/rc_encourage"
|
android:id="@+id/rc_encourage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:paddingLeft="15dp"
|
android:paddingLeft="15dp"
|
||||||
android:paddingRight="15dp"
|
android:paddingRight="15dp">
|
||||||
>
|
|
||||||
|
|
||||||
<com.makeramen.roundedimageview.RoundedImageView
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
@ -15,8 +13,7 @@
|
|||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginRight="15dp"
|
android:layout_marginRight="15dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:riv_oval="true"
|
app:riv_oval="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
@ -28,8 +25,7 @@
|
|||||||
android:maxWidth="130dp"
|
android:maxWidth="130dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/sign"
|
android:id="@+id/sign"
|
||||||
@ -41,17 +37,16 @@
|
|||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@color/gray3"
|
android:textColor="@color/gray3"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toRightOf="@id/name"
|
|
||||||
android:layout_alignTop="@id/name"
|
android:layout_alignTop="@id/name"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
|
android:layout_toRightOf="@id/name"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -59,18 +54,33 @@
|
|||||||
android:layout_width="18dp"
|
android:layout_width="18dp"
|
||||||
android:layout_height="15dp" />
|
android:layout_height="15dp" />
|
||||||
|
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="19dp">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level_anchor"
|
android:id="@+id/level_anchor"
|
||||||
android:layout_width="30dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="15dp"
|
android:layout_height="19dp" />
|
||||||
android:layout_marginLeft="5dp"/>
|
|
||||||
|
<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:textColor="@color/white"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level"
|
android:id="@+id/level"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="15dp"
|
android:layout_height="15dp"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="5dp" />
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -86,23 +96,21 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="@color/fg_btn_follow"
|
android:textColor="@color/fg_btn_follow"
|
||||||
android:textSize="11sp"
|
android:textSize="11sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone" />
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<pl.droidsonroids.gif.GifImageView
|
<pl.droidsonroids.gif.GifImageView
|
||||||
android:id="@+id/btn_live"
|
android:id="@+id/btn_live"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:src="@mipmap/icon_user_home_living"/>
|
android:adjustViewBounds="true"
|
||||||
|
android:src="@mipmap/icon_user_home_living"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
style="@style/line2"
|
style="@style/line2"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@ -1,28 +1,22 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/white"
|
android:background="@color/white">
|
||||||
>
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/bottom"
|
android:id="@+id/bottom"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="46dp"
|
android:layout_height="46dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true">
|
||||||
>
|
|
||||||
|
|
||||||
<View
|
<View style="@style/line2" />
|
||||||
style="@style/line2"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal">
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_follow_2"
|
android:id="@+id/btn_follow_2"
|
||||||
@ -33,16 +27,14 @@
|
|||||||
android:text="@string/follow"
|
android:text="@string/follow"
|
||||||
android:textColor="@color/textColor2"
|
android:textColor="@color/textColor2"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="@color/gray2"
|
android:layout_marginBottom="10dp"
|
||||||
/>
|
android:background="@color/gray2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_pri_msg"
|
android:id="@+id/btn_pri_msg"
|
||||||
@ -53,16 +45,14 @@
|
|||||||
android:text="@string/pri_msg"
|
android:text="@string/pri_msg"
|
||||||
android:textColor="@color/textColor2"
|
android:textColor="@color/textColor2"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="@color/gray2"
|
android:layout_marginBottom="10dp"
|
||||||
/>
|
android:background="@color/gray2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_black"
|
android:id="@+id/btn_black"
|
||||||
@ -73,8 +63,7 @@
|
|||||||
android:text="@string/black"
|
android:text="@string/black"
|
||||||
android:textColor="@color/textColor2"
|
android:textColor="@color/textColor2"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
@ -82,8 +71,7 @@
|
|||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@id/bottom"
|
android:layout_above="@id/bottom">
|
||||||
>
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
android:id="@+id/appBarLayout"
|
android:id="@+id/appBarLayout"
|
||||||
@ -92,45 +80,39 @@
|
|||||||
android:background="@color/transparent"
|
android:background="@color/transparent"
|
||||||
android:fadingEdge="none"
|
android:fadingEdge="none"
|
||||||
app:elevation="0dp"
|
app:elevation="0dp"
|
||||||
app:layout_behavior="com.yunbao.common.custom.FixAppBarLayoutBehavior"
|
app:layout_behavior="com.yunbao.common.custom.FixAppBarLayoutBehavior">
|
||||||
>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="65dp"
|
android:minHeight="65dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed"
|
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||||
>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="220dp"
|
android:layout_height="220dp">
|
||||||
>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/bg_avatar"
|
android:id="@+id/bg_avatar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop" />
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#b3000000"
|
android:background="#b3000000" />
|
||||||
/>
|
|
||||||
|
|
||||||
<com.makeramen.roundedimageview.RoundedImageView
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
android:layout_width="70dp"
|
android:layout_width="70dp"
|
||||||
android:layout_height="70dp"
|
android:layout_height="70dp"
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_marginTop="70dp"
|
android:layout_marginTop="70dp"
|
||||||
|
android:layout_marginRight="20dp"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
app:riv_oval="true"
|
app:riv_oval="true" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
@ -140,35 +122,48 @@
|
|||||||
android:layout_toRightOf="@id/avatar"
|
android:layout_toRightOf="@id/avatar"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/sex"
|
android:id="@+id/sex"
|
||||||
android:layout_width="18dp"
|
android:layout_width="18dp"
|
||||||
android:layout_height="15dp"
|
android:layout_height="15dp"
|
||||||
android:layout_below="@id/name"
|
android:layout_below="@id/name"
|
||||||
android:layout_marginRight="5dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_toRightOf="@id/avatar"
|
android:layout_marginRight="5dp"
|
||||||
/>
|
android:layout_toRightOf="@id/avatar" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="19dp"
|
||||||
|
android:layout_alignTop="@id/sex"
|
||||||
|
android:layout_marginRight="5dp"
|
||||||
|
android:layout_toRightOf="@id/sex">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level_anchor"
|
android:id="@+id/level_anchor"
|
||||||
android:layout_width="30dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="15dp"
|
android:layout_height="19dp" />
|
||||||
android:layout_alignTop="@id/sex"
|
|
||||||
android:layout_marginRight="5dp"
|
<TextView
|
||||||
android:layout_toRightOf="@id/sex"
|
android:id="@+id/leave"
|
||||||
/>
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="28dp"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level"
|
android:id="@+id/level"
|
||||||
android:layout_width="30dp"
|
android:layout_width="30dp"
|
||||||
android:layout_height="15dp"
|
android:layout_height="15dp"
|
||||||
android:layout_alignTop="@id/sex"
|
android:layout_alignTop="@id/sex"
|
||||||
android:layout_toRightOf="@id/level_anchor"
|
android:layout_toRightOf="@id/level_anchor" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/id_val"
|
android:id="@+id/id_val"
|
||||||
@ -178,8 +173,7 @@
|
|||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_toRightOf="@id/avatar"
|
android:layout_toRightOf="@id/avatar"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_fans"
|
android:id="@+id/btn_fans"
|
||||||
@ -189,21 +183,19 @@
|
|||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="15dp"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/line"
|
android:id="@+id/line"
|
||||||
android:layout_width="1dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="12dp"
|
android:layout_height="12dp"
|
||||||
android:layout_alignTop="@id/btn_fans"
|
|
||||||
android:layout_below="@id/avatar"
|
android:layout_below="@id/avatar"
|
||||||
|
android:layout_alignTop="@id/btn_fans"
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginTop="3dp"
|
android:layout_marginTop="3dp"
|
||||||
|
android:layout_marginRight="15dp"
|
||||||
android:layout_toRightOf="@id/btn_fans"
|
android:layout_toRightOf="@id/btn_fans"
|
||||||
android:background="@color/white"
|
android:background="@color/white" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/btn_follow"
|
android:id="@+id/btn_follow"
|
||||||
@ -212,8 +204,7 @@
|
|||||||
android:layout_alignTop="@id/btn_fans"
|
android:layout_alignTop="@id/btn_fans"
|
||||||
android:layout_toRightOf="@id/line"
|
android:layout_toRightOf="@id/line"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/sign"
|
android:id="@+id/sign"
|
||||||
@ -221,38 +212,34 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/btn_fans"
|
android:layout_below="@id/btn_fans"
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginRight="15dp"
|
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginRight="15dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="#fff"
|
android:textColor="#fff"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp" />
|
||||||
/>
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="5dp"
|
||||||
android:text="@string/impress"
|
android:text="@string/impress"
|
||||||
android:textColor="@color/textColor2"
|
android:textColor="@color/textColor2"
|
||||||
android:textSize="15dp"
|
android:textSize="15dp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="34dp"
|
android:layout_height="34dp"
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="15dp">
|
||||||
>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/impress_group"
|
android:id="@+id/impress_group"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/no_impress_tip"
|
android:id="@+id/no_impress_tip"
|
||||||
@ -262,16 +249,14 @@
|
|||||||
android:text="@string/impress_tip_3"
|
android:text="@string/impress_tip_3"
|
||||||
android:textColor="@color/gray3"
|
android:textColor="@color/gray3"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible" />
|
||||||
/>
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="3dp"
|
android:layout_height="3dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:background="@color/gray2"
|
android:background="@color/gray2" />
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/con_group_wrap"
|
android:id="@+id/con_group_wrap"
|
||||||
@ -280,14 +265,12 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="15dp"
|
android:paddingLeft="15dp"
|
||||||
android:paddingRight="15dp"
|
android:paddingRight="15dp">
|
||||||
>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="18dp"
|
android:layout_width="18dp"
|
||||||
android:layout_height="18dp"
|
android:layout_height="18dp"
|
||||||
android:src="@mipmap/icon_live_user_home_1"
|
android:src="@mipmap/icon_live_user_home_1" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/votes_name"
|
android:id="@+id/votes_name"
|
||||||
@ -295,8 +278,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -307,21 +289,17 @@
|
|||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal" />
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="18dp"
|
android:layout_height="18dp"
|
||||||
android:src="@mipmap/icon_arrow_right"
|
android:src="@mipmap/icon_arrow_right" />
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View style="@style/line2" />
|
||||||
style="@style/line2"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/guard_group_wrap"
|
android:id="@+id/guard_group_wrap"
|
||||||
@ -330,14 +308,12 @@
|
|||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="15dp"
|
android:paddingLeft="15dp"
|
||||||
android:paddingRight="15dp"
|
android:paddingRight="15dp">
|
||||||
>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="18dp"
|
android:layout_width="18dp"
|
||||||
android:layout_height="18dp"
|
android:layout_height="18dp"
|
||||||
android:src="@mipmap/icon_live_user_home_2"
|
android:src="@mipmap/icon_live_user_home_2" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -345,8 +321,7 @@
|
|||||||
android:layout_marginLeft="8dp"
|
android:layout_marginLeft="8dp"
|
||||||
android:text="@string/guard_list"
|
android:text="@string/guard_list"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/guard_group"
|
android:id="@+id/guard_group"
|
||||||
@ -356,14 +331,12 @@
|
|||||||
android:layout_marginRight="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal" />
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="18dp"
|
android:layout_height="18dp"
|
||||||
android:src="@mipmap/icon_arrow_right"
|
android:src="@mipmap/icon_arrow_right" />
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -372,14 +345,12 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="5dp"
|
android:layout_height="5dp"
|
||||||
android:background="@color/gray2"
|
android:background="@color/gray2" />
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||||
@ -387,13 +358,10 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="33dp"
|
android:layout_height="33dp"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
/>
|
android:layout_marginBottom="5dp" />
|
||||||
|
|
||||||
<View
|
<View style="@style/line2" />
|
||||||
style="@style/line2"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
@ -403,8 +371,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
/>
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
@ -412,8 +379,7 @@
|
|||||||
android:id="@+id/top"
|
android:id="@+id/top"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="65dp"
|
android:layout_height="65dp"
|
||||||
android:clickable="true"
|
android:clickable="true">
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/titleView"
|
android:id="@+id/titleView"
|
||||||
@ -425,8 +391,7 @@
|
|||||||
android:paddingTop="30dp"
|
android:paddingTop="30dp"
|
||||||
android:textColor="@color/textColor"
|
android:textColor="@color/textColor"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/btn_back"
|
android:id="@+id/btn_back"
|
||||||
@ -436,20 +401,18 @@
|
|||||||
android:layout_marginBottom="3dp"
|
android:layout_marginBottom="3dp"
|
||||||
android:padding="9dp"
|
android:padding="9dp"
|
||||||
android:src="@mipmap/icon_back"
|
android:src="@mipmap/icon_back"
|
||||||
android:tint="@color/white"
|
android:tint="@color/white" />
|
||||||
/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/btn_share"
|
android:id="@+id/btn_share"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginBottom="3dp"
|
||||||
android:padding="8dp"
|
android:padding="8dp"
|
||||||
android:src="@mipmap/icon_user_home_share"
|
android:src="@mipmap/icon_user_home_share"
|
||||||
android:tint="@color/white"
|
android:tint="@color/white" />
|
||||||
/>
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
@ -219,10 +219,27 @@
|
|||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="19dp">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level_anchor"
|
android:id="@+id/level_anchor"
|
||||||
android:layout_width="30dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="15dp" />
|
android:layout_height="19dp" />
|
||||||
|
|
||||||
|
<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:textColor="@color/white"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level"
|
android:id="@+id/level"
|
||||||
|
@ -126,12 +126,30 @@
|
|||||||
android:layout_height="15dp"
|
android:layout_height="15dp"
|
||||||
android:src="@mipmap/icon_userlv" />
|
android:src="@mipmap/icon_userlv" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/level_anchor_la"
|
||||||
|
android:layout_width="55dp"
|
||||||
|
android:layout_height="19dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level_anchor"
|
android:id="@+id/level_anchor"
|
||||||
android:layout_width="30dp"
|
android:layout_width="55dp"
|
||||||
android:layout_height="15dp"
|
android:layout_height="19dp" />
|
||||||
android:layout_marginLeft="5dp"
|
|
||||||
android:visibility="gone" />
|
<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:textColor="@color/white"
|
||||||
|
android:textSize="10sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/level"
|
android:id="@+id/level"
|
||||||
|
Loading…
Reference in New Issue
Block a user