调整仅接口返回有top图片时才认为是排位赛并显示UI

This commit is contained in:
zlzw 2022-11-16 14:07:07 +08:00
parent 7842c1b838
commit 0f457efce6

View File

@ -1540,6 +1540,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
pkRankVf.addView(titleIcon); pkRankVf.addView(titleIcon);
pkRankVf.addView(hourView); pkRankVf.addView(hourView);
pkRankVf.startFlipping(); pkRankVf.startFlipping();
if(StringUtil.isEmpty(bean.getPkTopImgUrl())){
return;
}
if(Integer.parseInt(bean.getRedVal())>2) { if(Integer.parseInt(bean.getRedVal())>2) {
mRedVal.setVisibility(View.VISIBLE); mRedVal.setVisibility(View.VISIBLE);
mRedVal.setText(bean.getRedVal() + "連勝"); mRedVal.setText(bean.getRedVal() + "連勝");
@ -1548,7 +1552,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mBlueVal.setVisibility(View.VISIBLE); mBlueVal.setVisibility(View.VISIBLE);
mBlueVal.setText(bean.getBlueVal() + "連勝"); mBlueVal.setText(bean.getBlueVal() + "連勝");
} }
//ImgLoader.display(mContext,bean.getPkTopImgUrl(),mPkRankTopIcon); mPkRankTopIcon.setVisibility(View.VISIBLE);
ImgLoader.display(mContext,bean.getPkTopImgUrl(),mPkRankTopIcon);
} }
}, Throwable::printStackTrace) }, Throwable::printStackTrace)
.isDisposed(); .isDisposed();
@ -1764,7 +1769,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
lt_pk_line.requestLayout(); lt_pk_line.requestLayout();
lt_pk_line.setVisibility(View.VISIBLE); lt_pk_line.setVisibility(View.VISIBLE);
mPkRankTopIcon.setVisibility(View.VISIBLE);
img_pk_fist_l.setBackgroundResource(R.mipmap.icon_red_no1); img_pk_fist_l.setBackgroundResource(R.mipmap.icon_red_no1);
img_pk_fist_r.setBackgroundResource(R.mipmap.icon_blue_no1); img_pk_fist_r.setBackgroundResource(R.mipmap.icon_blue_no1);
ImgLoader.display2((LiveActivity) Contexts, "", avatar_l1); ImgLoader.display2((LiveActivity) Contexts, "", avatar_l1);