ResumeEduAdapter.java
2.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.hh.xuetubao.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.hh.xuetubao.R;
import com.hh.xuetubao.bean.ResumeDetailBean;
import java.util.List;
public class ResumeEduAdapter extends BaseAdapter {
private List<ResumeDetailBean.EduListBean> list;
private Context context;
private TextView school;
public ResumeEduAdapter(List<ResumeDetailBean.EduListBean> list, Context context) {
this.list = list;
this.context = context;
}
@Override
public int getCount() {
return list.size();
}
@Override
public Object getItem(int position) {
return list.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = LayoutInflater.from(context).inflate(R.layout.lv_resume_edu, null);
TextView school = (TextView) view.findViewById(R.id.tv_school);
TextView startTime = (TextView) view.findViewById(R.id.tv_start);
TextView endTime = (TextView) view.findViewById(R.id.tv_end);
TextView xueLi = (TextView) view.findViewById(R.id.tv_xueli);
TextView zhuanYe = (TextView) view.findViewById(R.id.tv_zhuanye);
if (list.get(position).getSchoolName() != null)
school.setText(list.get(position).getSchoolName());
if (list.get(position).getStartTime() != null)
startTime.setText(list.get(position).getStartTime());
if (list.get(position).getEdntime() != null)
endTime.setText(list.get(position).getEdntime());
if (list.get(position).getQualification() != null)
xueLi.setText(list.get(position).getQualification());
if (list.get(position).getSpecialityName() != null)
zhuanYe.setText(list.get(position).getSpecialityName());
return null;
}
}