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