合并1
This commit is contained in:
@@ -168,7 +168,7 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
//头像
|
||||
// ImageUtils.loadHeadCC(item.getAvatar(), helper.getView(R.id.dy_head_image));
|
||||
MeHeadView headView = helper.getView(R.id.dy_head_image);
|
||||
headView.setData(item.getAvatar(), "", item.getSex() + "");
|
||||
headView.setData(item.getAvatar(), "", item.getNobility_image());
|
||||
//动态内容以富文本展示
|
||||
String content = item.getContent();
|
||||
if (content == null || content.length() == 0) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.xscm.moduleutil.adapter;
|
||||
|
||||
import static android.view.View.GONE;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.text.Spannable;
|
||||
@@ -16,6 +18,7 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
import com.xscm.moduleutil.event.RoomGiftClickToEvent;
|
||||
@@ -111,38 +114,6 @@ public class GiftRoomAdapter extends BaseAdapter {
|
||||
}
|
||||
|
||||
|
||||
// private static class MyGestureDetector extends GestureDetector {
|
||||
// private GiftRoomAdapter mAdapter;
|
||||
// private RoonGiftModel mGiftModel;
|
||||
//
|
||||
// public MyGestureDetector(Context context) {
|
||||
// super(context, new SimpleOnGestureListener() {
|
||||
// @Override
|
||||
// public boolean onSingleTapConfirmed(MotionEvent e) {
|
||||
// if (mAdapter != null && mGiftModel != null) {
|
||||
// EventBus.getDefault().post(new RoomGiftClickToEvent(mAdapter, mGiftModel, 1));
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean onDoubleTap(MotionEvent e) {
|
||||
// if (mAdapter != null && mGiftModel != null) {
|
||||
// EventBus.getDefault().post(new RoomGiftClickToEvent(mAdapter, mGiftModel, 2));
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// });
|
||||
// setOnDoubleTapListener(getListener());
|
||||
// }
|
||||
//
|
||||
// public void setGiftModel(GiftRoomAdapter adapter, RoonGiftModel giftModel) {
|
||||
// this.mAdapter = adapter;
|
||||
// this.mGiftModel = giftModel;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressLint({"SetTextI18n", "ClickableViewAccessibility"})
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
@@ -157,6 +128,7 @@ public class GiftRoomAdapter extends BaseAdapter {
|
||||
viewHolder.item_layout = (ConstraintLayout) convertView.findViewById(R.id.cl_gift);
|
||||
viewHolder.ivDownOn = (ImageView) convertView.findViewById(R.id.iv_down_on);
|
||||
viewHolder.cl_iv_down_on = (ConstraintLayout) convertView.findViewById(R.id.cl_iv_down_on);
|
||||
viewHolder.iv_gift_select= (ImageView) convertView.findViewById(R.id.iv_gift_select);
|
||||
|
||||
convertView.setTag(viewHolder);
|
||||
} else {
|
||||
@@ -165,10 +137,17 @@ public class GiftRoomAdapter extends BaseAdapter {
|
||||
|
||||
viewHolder.item_layout.setOnClickListener(v -> {
|
||||
// RoonGiftModel clickedModel = (RoonGiftModel) v.getTag();
|
||||
EventBus.getDefault().post(new RoomGiftClickToEvent(this, giftModel, 1));
|
||||
|
||||
if (giftModel.getIs_lock()==0) {
|
||||
EventBus.getDefault().post(new RoomGiftClickToEvent(this, giftModel, 1));
|
||||
}else if (giftModel.getIs_lock()==1){
|
||||
ToastUtils.show("当前属于爵位礼物,请开通爵位");
|
||||
}
|
||||
});
|
||||
|
||||
if (giftModel.getIs_lock()==0){
|
||||
viewHolder.iv_gift_select.setVisibility(GONE);
|
||||
}else {
|
||||
viewHolder.iv_gift_select.setVisibility(View.VISIBLE);
|
||||
}
|
||||
/*
|
||||
* 在给View绑定显示的数据时,计算正确的position = position + curIndex * pageSize,
|
||||
*/
|
||||
@@ -234,6 +213,7 @@ public class GiftRoomAdapter extends BaseAdapter {
|
||||
public ImageView iv_gift_pic;
|
||||
public TextView tv_gift_change_love_values;
|
||||
public ImageView ivDownOn;
|
||||
public ImageView iv_gift_select;
|
||||
public ConstraintLayout cl_iv_down_on;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user