|
|
@@ -1,6 +1,7 @@
|
|
|
package com.sheep.gamegroup.module.personal.adapter;
|
|
|
|
|
|
import android.support.annotation.Nullable;
|
|
|
+import android.text.TextUtils;
|
|
|
import android.view.View;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.TextView;
|
|
|
@@ -10,11 +11,14 @@ import com.chad.library.adapter.base.BaseViewHolder;
|
|
|
import com.sheep.gamegroup.model.entity.ILog;
|
|
|
import com.sheep.gamegroup.util.ListUtil;
|
|
|
import com.sheep.gamegroup.util.TimeUtil;
|
|
|
+import com.sheep.gamegroup.util.ViewUtil;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
+import rx.functions.Action1;
|
|
|
+
|
|
|
/**
|
|
|
* Created by realicing on 2018/12/21.
|
|
|
* realicing@sina.com
|
|
|
@@ -25,6 +29,13 @@ public class AdpILog extends BaseQuickAdapter<ILog, BaseViewHolder> {
|
|
|
super(R.layout.x_my_money_act_layout_item, data);
|
|
|
}
|
|
|
|
|
|
+ private Action1<ILog> callBack;
|
|
|
+
|
|
|
+ public AdpILog setCallBack(Action1<ILog> callBack) {
|
|
|
+ this.callBack = callBack;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
protected void convert(BaseViewHolder helper, ILog item) {
|
|
|
View convertView = helper.itemView;
|
|
|
@@ -33,6 +44,17 @@ public class AdpILog extends BaseQuickAdapter<ILog, BaseViewHolder> {
|
|
|
View my_money_item_top = convertView.findViewById(R.id.my_money_item_top);
|
|
|
View my_money_item_center = convertView.findViewById(R.id.my_money_item_center);
|
|
|
View my_money_item_bottom = convertView.findViewById(R.id.my_money_item_bottom);
|
|
|
+ TextView btn_exchange_tv = convertView.findViewById(R.id.btn_exchange_tv);
|
|
|
+
|
|
|
+ //显示按钮
|
|
|
+ ViewUtil.setText(btn_exchange_tv, item.getEventBtnText());
|
|
|
+ ViewUtil.setVisibility(btn_exchange_tv, !TextUtils.isEmpty(item.getEventBtnText()));
|
|
|
+ btn_exchange_tv.setOnClickListener(view -> {
|
|
|
+ if(callBack != null){
|
|
|
+ callBack.call(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
final TextView my_money_item_recharge_amount = convertView.findViewById(R.id.my_money_item_recharge_amount);
|
|
|
TextView my_money_item_recharge_status = convertView.findViewById(R.id.my_money_item_recharge_status);
|
|
|
TextView my_money_item_recharge_time = convertView.findViewById(R.id.my_money_item_recharge_time);
|