2025-10-28 16:56:13 +08:00
|
|
|
package com.xscm.modulemain.adapter;
|
2025-10-20 10:16:44 +08:00
|
|
|
|
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
|
|
|
|
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
|
|
|
import com.chad.library.adapter.base.BaseViewHolder;
|
2025-10-28 16:56:13 +08:00
|
|
|
import com.xscm.modulemain.R;
|
2025-10-20 10:16:44 +08:00
|
|
|
import com.xscm.moduleutil.bean.MyRoomBean;
|
|
|
|
|
import com.xscm.moduleutil.utils.ImageUtils;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
public class ChatRoomMyManageAdapter extends BaseQuickAdapter<MyRoomBean, BaseViewHolder> {
|
|
|
|
|
|
|
|
|
|
private int index = -1;
|
|
|
|
|
|
|
|
|
|
public ChatRoomMyManageAdapter() {
|
|
|
|
|
super(R.layout.room_index_item_chatroom_my_foot);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected void convert(BaseViewHolder helper, MyRoomBean item) {
|
|
|
|
|
ImageUtils.loadHeadCC(item.getRoom_cover(), helper.getView(R.id.iv_follow_bg));
|
|
|
|
|
ImageUtils.loadHeadCC(item.getLabel_icon(), helper.getView(R.id.iv_type));
|
|
|
|
|
// ImageUtils.loadGift(helper.getView(R.id.iv_hot), ImageUtils.ANIM);
|
|
|
|
|
helper.setText(R.id.tv_name, item.getRoom_name());
|
|
|
|
|
helper.setText(R.id.tv_id, "ID: " + item.getRoom_id());
|
|
|
|
|
// helper.setText(R.id.tv_num, item.get());
|
|
|
|
|
ImageUtils.loadRes(com.xscm.moduleutil.R.drawable.voice_play, helper.getView(R.id.iv_play));
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setIndex(int index) {
|
|
|
|
|
this.index = index;
|
|
|
|
|
notifyDataSetChanged();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setNewData(@Nullable List<MyRoomBean> data) {
|
|
|
|
|
index = -1;
|
|
|
|
|
super.setNewData(data);
|
|
|
|
|
}
|
|
|
|
|
}
|