修改测试问题,shouye ytuijian
This commit is contained in:
parent
192e12fe19
commit
b465cdc455
@ -45,13 +45,7 @@ public class SearchRecommendBodyItemViewHolder extends RecyclerView.ViewHolder {
|
||||
pkico = (ImageView) itemView.findViewById(R.id.pk_ico);
|
||||
drPkIco = (ImageView) itemView.findViewById(R.id.dr_pk_ico);
|
||||
pkAvatar = (ImageView) itemView.findViewById(R.id.pk_avatar);
|
||||
liveType.setVisibility(View.GONE);
|
||||
mLiveIco.setVisibility(View.GONE);
|
||||
mLiveState.setVisibility(View.GONE);
|
||||
mNum.setVisibility(View.GONE);
|
||||
pkAvatar.setVisibility(View.GONE);
|
||||
pkico.setVisibility(View.GONE);
|
||||
mTitle.setVisibility(View.GONE);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -68,50 +62,9 @@ public class SearchRecommendBodyItemViewHolder extends RecyclerView.ViewHolder {
|
||||
.into(liveType);
|
||||
}
|
||||
ImgLoader.display(itemView.getContext(), model.getThumb(), mCover);
|
||||
bgs.setVisibility(View.VISIBLE);
|
||||
pkico.setVisibility(View.GONE);
|
||||
pkAvatar.setVisibility(View.GONE);
|
||||
drPkIco.setVisibility(View.GONE);
|
||||
if (model.getDrpkStatus() != null && model.getDrpkStatus().equals("1")) {
|
||||
drPkIco.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (model.getPkAvatarThumb() != null && !model.getPkAvatarThumb().equals("")) {
|
||||
ImgLoader.display(mContext, model.getPkAvatarThumb(), pkAvatar);
|
||||
pkico.setVisibility(View.VISIBLE);
|
||||
pkAvatar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mName.setText(model.getUserNicename());
|
||||
if (TextUtils.isEmpty(model.getTitle())) {
|
||||
if (mTitle.getVisibility() == View.VISIBLE) {
|
||||
mTitle.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
if (mTitle.getVisibility() != View.VISIBLE) {
|
||||
mTitle.setVisibility(View.VISIBLE);
|
||||
}
|
||||
mTitle.setText(model.getTitle());
|
||||
}
|
||||
mNum.setText(formatBigNum.formatBigNum(String.valueOf(model.getHotNum())));
|
||||
views.setVisibility(View.GONE);
|
||||
if (model.getIslive() == 1) {
|
||||
views.setVisibility(View.VISIBLE);
|
||||
//直播中
|
||||
mType.setImageResource(MainIconUtil.getLiveTypeIcon(model.getType()));
|
||||
mType.setVisibility(View.VISIBLE);
|
||||
mLiveIco.setImageResource(R.mipmap.icon_main_rest_work);
|
||||
mNum.setVisibility(View.VISIBLE);
|
||||
liveType.setVisibility(View.VISIBLE);
|
||||
mLiveState.setText(R.string.lives_state);
|
||||
} else {
|
||||
views.setVisibility(View.VISIBLE);
|
||||
//休息中
|
||||
mType.setImageResource(MainIconUtil.getLiveTypeIcon(Constants.LIVE_TYPE_RESTING));
|
||||
mType.setVisibility(View.GONE);
|
||||
mLiveIco.setImageResource(R.mipmap.icon_main_rest_spot);
|
||||
mLiveState.setText(R.string.rest_state);
|
||||
liveType.setVisibility(View.GONE);
|
||||
mNum.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
mCover.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -120,5 +73,12 @@ public class SearchRecommendBodyItemViewHolder extends RecyclerView.ViewHolder {
|
||||
Bus.get().post(new JumpUserHomeEvent(searchModel));
|
||||
}
|
||||
});
|
||||
mLiveIco.setVisibility(View.GONE);
|
||||
mLiveState.setVisibility(View.GONE);
|
||||
mNum.setVisibility(View.GONE);
|
||||
pkAvatar.setVisibility(View.GONE);
|
||||
pkico.setVisibility(View.GONE);
|
||||
mTitle.setVisibility(View.GONE);
|
||||
drPkIco.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_marginStart="13dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user