You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
|
3 years ago
|
package com.rehome.zhdcoa.adapter;
|
||
|
|
|
||
|
|
import android.content.Context;
|
||
|
|
import android.widget.TextView;
|
||
|
|
|
||
|
|
import com.rehome.zhdcoa.R;
|
||
|
|
import com.rehome.zhdcoa.bean.SuppliesBean;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Created by Rehome-rjb1 on 2017/6/3.
|
||
|
|
* 办公领用新增adapter
|
||
|
|
*/
|
||
|
|
|
||
|
|
public class ApplySuppliesAdapter1 extends CommonAdapter<SuppliesBean.DataRowsBean.OrderlistBean> {
|
||
|
|
|
||
|
|
private final List<SuppliesBean.DataRowsBean.OrderlistBean> datas;
|
||
|
|
|
||
|
|
private final Context context;
|
||
|
|
|
||
|
|
private final ApplySuppliesAdapterListener listener;
|
||
|
|
|
||
|
|
public ApplySuppliesAdapter1(Context context, List<SuppliesBean.DataRowsBean.OrderlistBean> datas, ApplySuppliesAdapterListener listener) {
|
||
|
|
super(context, R.layout.item_apply_supplies1, datas);
|
||
|
|
this.datas = datas;
|
||
|
|
this.context = context;
|
||
|
|
this.listener = listener;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
protected void convert(ViewHolder viewHolder, final SuppliesBean.DataRowsBean.OrderlistBean item, final int position) {
|
||
|
|
|
||
|
|
|
||
|
|
TextView tv = viewHolder.getView(R.id.tv_name);
|
||
|
|
|
||
|
|
tv.setText(item.getApplySuppliesMc() + " X " + item.getApplySuppliesSL());
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
public interface ApplySuppliesAdapterListener {
|
||
|
|
void selectSupplies(int position);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|