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.
45 lines
1.6 KiB
Java
45 lines
1.6 KiB
Java
|
3 years ago
|
package com.rehome.zhdcoa.adapter;
|
||
|
|
|
||
|
|
import android.content.Context;
|
||
|
|
|
||
|
|
import com.rehome.zhdcoa.R;
|
||
|
|
import com.rehome.zhdcoa.bean.ApplyListConferenceBean;
|
||
|
|
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Created by Rehome-rjb1 on 2017/5/17.
|
||
|
|
* 会议申请列表的adapter
|
||
|
|
*/
|
||
|
|
|
||
|
|
public class ApplyConferenceAdapter extends CommonAdapter<ApplyListConferenceBean.RowsBean> {
|
||
|
|
|
||
|
|
private final Context context;
|
||
|
|
|
||
|
|
public ApplyConferenceAdapter(Context context, List<ApplyListConferenceBean.RowsBean> datas) {
|
||
|
|
super(context, R.layout.item_apply_conference, datas);
|
||
|
|
this.context = context;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
protected void convert(ViewHolder viewHolder, ApplyListConferenceBean.RowsBean item, int position) {
|
||
|
|
|
||
|
|
if ((position + 1) % 2 == 0) {
|
||
|
|
viewHolder.setBackgroundColor(R.id.ll, context.getResources().getColor(R.color.itemColor));
|
||
|
|
} else {
|
||
|
|
viewHolder.setBackgroundColor(R.id.ll, context.getResources().getColor(R.color.white));
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
viewHolder.setTextColor(R.id.tv_status, context.getResources().getColor(R.color.textstatus1));
|
||
|
|
viewHolder.setBackgroundRes(R.id.tv_status, R.drawable.textstatus1);
|
||
|
|
|
||
|
|
viewHolder.setText(R.id.tv_status, item.getItemname());
|
||
|
|
viewHolder.setText(R.id.tv_name, item.getProposername());
|
||
|
|
viewHolder.setText(R.id.tv_time, item.getProposertime());
|
||
|
|
viewHolder.setText(R.id.tv_start_time, item.getConferencehykssj());
|
||
|
|
viewHolder.setText(R.id.tv_conferencehysmc, item.getConferencehysmc());
|
||
|
|
viewHolder.setText(R.id.tv_conferencehynr,item.getConferencehynr());
|
||
|
|
}
|
||
|
|
}
|