贵族图标替换 同时增加新的参数
This commit is contained in:
parent
31c8365696
commit
dffe681b95
@ -31,19 +31,28 @@ public class LiveHttpUtil {
|
||||
HttpClient.getInstance().cancel(tag);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前直播间的用户列表
|
||||
*/
|
||||
public static void getUserList(String liveuid, String stream, String type, int p, HttpCallback callback) {
|
||||
public static void getUserList(String liveuid, String stream, String type, int p,String is_noble,HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.getUserLists", LiveHttpConsts.GET_USER_LIST)
|
||||
.params("liveuid", liveuid)
|
||||
.params("stream", stream)
|
||||
.params("type", type)
|
||||
.params("p", p)
|
||||
.params("is_noble", is_noble)
|
||||
.params("version", "" + VersionUtil.getVersion())
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前直播间的用户列表
|
||||
*/
|
||||
public static void getUserList(String liveuid, String stream, String type, int p, HttpCallback callback) {
|
||||
getUserList(liveuid,stream,type,p,"0",callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取直播用户日榜/周榜
|
||||
*
|
||||
|
@ -31,6 +31,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.CommonIconUtil;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.NobleUtil;
|
||||
import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||
@ -56,6 +57,8 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
private List<String> outRankHide = new ArrayList<>();
|
||||
private boolean noble = false;
|
||||
|
||||
private String TAG = "UserMoreInfoAdapter";
|
||||
|
||||
public UserMoreInfoAdapter setNoble(boolean noble) {
|
||||
this.noble = noble;
|
||||
return this;
|
||||
@ -160,30 +163,46 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
tvName.setTextSize(12);
|
||||
tvName.setTextColor(mContext.getResources().getColor(R.color.white));
|
||||
if (type.equals("1")) {
|
||||
String NobleImg= bean.getNoble_img();
|
||||
if (!TextUtils.isEmpty(NobleImg)){
|
||||
ImgLoader.display(mContext, NobleImg, mIcon);
|
||||
} else if (!bean.getDress().getMedal().equals("")) {
|
||||
ImgLoader.display(mContext, bean.getDress().getMedal(), mIcon);
|
||||
} else {
|
||||
int guardType = ((LiveUserGiftBean) bean).getGuardType();
|
||||
if (guardType == Constants.GUARD_TYPE_NONE) {
|
||||
if (mIcon.getVisibility() != View.VISIBLE) {
|
||||
mIcon.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if (noble) {
|
||||
Log.i(TAG, "type:1 贵族");
|
||||
String NobleImg = bean.getNoble_img();
|
||||
if (!NobleImg.equals("")) {
|
||||
ImgLoader.display(mContext, NobleImg, mIcon);
|
||||
} else {
|
||||
if (mIcon.getVisibility() == View.INVISIBLE) {
|
||||
mIcon.setVisibility(View.VISIBLE);
|
||||
String vipType = bean.getNoble_id();
|
||||
if (!TextUtils.isEmpty(vipType) && !vipType.equals("0")) {
|
||||
mIcon.setImageResource(NobleUtil.nobleIdToImageResId(Integer.parseInt(vipType)));
|
||||
}
|
||||
if (guardType == Constants.GUARD_TYPE_DAY) {
|
||||
mIcon.setImageDrawable(mGuardDrawable0);
|
||||
} else if (guardType == Constants.GUARD_TYPE_MONTH) {
|
||||
// mIcon.setImageDrawable(mGuardDrawable1); //观众列表不显示粉丝牌
|
||||
} else if (guardType == Constants.GUARD_TYPE_YEAR) {
|
||||
mIcon.setImageDrawable(mGuardDrawable2);
|
||||
}
|
||||
} else {
|
||||
Log.i(TAG, "type:1 普通观众");
|
||||
//清空mIcon的Img
|
||||
mIcon.setImageBitmap(null);
|
||||
if (!bean.getDress().getMedal().equals("")) {
|
||||
Log.i(TAG, "getMedal:1 普通观众");
|
||||
ImgLoader.display(mContext, bean.getDress().getMedal(), mIcon);
|
||||
} else {
|
||||
Log.i(TAG, "getMedal:2 普通观众");
|
||||
int guardType = ((LiveUserGiftBean) bean).getGuardType();
|
||||
if (guardType == Constants.GUARD_TYPE_NONE) {
|
||||
if (mIcon.getVisibility() != View.VISIBLE) {
|
||||
mIcon.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
} else {
|
||||
if (mIcon.getVisibility() == View.INVISIBLE) {
|
||||
mIcon.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (guardType == Constants.GUARD_TYPE_DAY) {
|
||||
mIcon.setImageDrawable(mGuardDrawable0);
|
||||
} else if (guardType == Constants.GUARD_TYPE_MONTH) {
|
||||
// mIcon.setImageDrawable(mGuardDrawable1); //观众列表不显示粉丝牌
|
||||
} else if (guardType == Constants.GUARD_TYPE_YEAR) {
|
||||
mIcon.setImageDrawable(mGuardDrawable2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (type.equals("2")) {
|
||||
int guardType = ((LiveUserGiftBean) bean).getGuardType();
|
||||
if (guardType == Constants.GUARD_TYPE_NONE) {
|
||||
@ -251,7 +270,7 @@ public class UserMoreInfoAdapter extends RefreshAdapter<UserBean> {
|
||||
} else {
|
||||
mRanksIcon.addView(rankImage, 0);
|
||||
}
|
||||
}else if(type.equals("6")){
|
||||
} else if (type.equals("6")) {
|
||||
L.e("type==6");
|
||||
}
|
||||
|
||||
|
@ -160,6 +160,7 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
Up();
|
||||
type = "guanzhong";
|
||||
mRefreshView.initData();
|
||||
userMoreInfoAdapter.setNoble(false);
|
||||
no_more.setImageBitmap(null);
|
||||
}
|
||||
});
|
||||
@ -241,7 +242,11 @@ public class LiveUserMoreDialogFragment extends AbsDialogFragment implements Vie
|
||||
callback.onError();
|
||||
}).isDisposed();
|
||||
} else {
|
||||
LiveHttpUtil.getUserList(mLiveUid, stream, type, p, callback);
|
||||
if(Tips=="1" && noble){
|
||||
LiveHttpUtil.getUserList(mLiveUid, stream, type, p,"1",callback);
|
||||
}else {
|
||||
LiveHttpUtil.getUserList(mLiveUid, stream, type, p,callback);
|
||||
}
|
||||
pg = p;
|
||||
if (p == 1) {
|
||||
noMoreLayout.setVisibility(View.VISIBLE);
|
||||
|
@ -5569,6 +5569,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
mLiveRoomHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
|
||||
//设置快速回复
|
||||
public void setFastMessage(List<String> greetings) {
|
||||
fastMsgRecyclerView.setVisibility(View.VISIBLE);
|
||||
fastMessageRecyclerViewAdapter.setMessage(greetings);
|
||||
|
@ -628,7 +628,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
//数据设置
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLiveRoomViewHolder.setLiveInfo(mLiveBean.getUid(), mLiveBean.getStream(), Integer.parseInt(data.getEnterRoomInfo().getUserlistTime()) * 4000);
|
||||
// mLiveRoomViewHolder.setFastMessage(greetings);
|
||||
mLiveRoomViewHolder.setFastMessage(greetings);
|
||||
mLiveRoomViewHolder.setVotes(data.getEnterRoomInfo().getVotestotal());
|
||||
//真爱排行 数量
|
||||
mLiveRoomViewHolder.setMedaRankNum(data.getEnterRoomInfo().getMedalRankNum());
|
||||
|
Loading…
Reference in New Issue
Block a user