合并接口第五次次上传

This commit is contained in:
18401019693
2022-11-26 16:12:22 +08:00
parent 2843131151
commit 3bdee09402
4 changed files with 24 additions and 13 deletions

View File

@@ -319,7 +319,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
//接口整合新加参数
private GuardUserModel guardUserModel;
private ViewFlipper flipper;
public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) {
super(context, parentView);
Contexts = context;
@@ -694,7 +694,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mic_view = (RelativeLayout) findViewById(R.id.mic_view);
mic_view1 = (RelativeLayout) findViewById(R.id.mic_view1);
mic_view2 = (RelativeLayout) findViewById(R.id.mic_view2);
flipper = (ViewFlipper) findViewById(R.id.hour_rank_list);
mic_ico = (ImageView) findViewById(R.id.mic_ico);
newMessage = (ImageView) findViewById(R.id.new_message);
atMessage = (ImageView) findViewById(R.id.at_message);
@@ -1488,7 +1488,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}
public void initHourRank(RankHourModel model) {
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.hour_rank_list);
if (flipper.getChildCount()>0){
flipper.removeAllViews();
}
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(44), DpUtil.dp2px(16));
LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
textParams.leftMargin = DpUtil.dp2px(5);
@@ -1534,7 +1536,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* 初始化小时榜
*/
public void initHourRankList() {
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.hour_rank_list);
if (flipper.getChildCount()>0){
flipper.removeAllViews();
}
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(44), DpUtil.dp2px(16));
LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
textParams.leftMargin = DpUtil.dp2px(5);
@@ -2475,8 +2479,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* 刷新用户列表
*/
public void refreshUserList(JSONObject obj) {
List<LiveUserGiftBean> list = GsonUtils.fromJson(obj.getString("userlist"), new TypeToken<List<LiveUserGiftBean>>() {
}.getType());
List<LiveUserGiftBean> list = JSON.parseArray(obj.getString("userlist"), LiveUserGiftBean.class);
mLiveUserAdapter.refreshList(list);
}