|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class InformationListAdapter extends ArrayAdapter<Pair<String,String>> |
|
|
public class InformationListAdapter extends ArrayAdapter<Pair<String,String>> |
|
|
{ |
|
|
{ |
|
|
private final List<Pair<String,String>> information; |
|
|
|
|
|
private final LayoutInflater inflater; |
|
|
private final LayoutInflater inflater; |
|
|
|
|
|
|
|
|
static class ViewHolder |
|
|
static class ViewHolder |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
super(context, R.layout.information_view, information); |
|
|
super(context, R.layout.information_view, information); |
|
|
this.inflater = context.getLayoutInflater(); |
|
|
this.inflater = context.getLayoutInflater(); |
|
|
this.information = information; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
|
|
|
|
|
|
holder = (ViewHolder)convertView.getTag(); |
|
|
holder = (ViewHolder)convertView.getTag(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Pair<String,String> info = information.get(position); |
|
|
|
|
|
|
|
|
Pair<String,String> info = getItem(position); |
|
|
holder.title.setText(info.first); |
|
|
holder.title.setText(info.first); |
|
|
holder.summary.setText(info.second); |
|
|
holder.summary.setText(info.second); |
|
|
return convertView; |
|
|
return convertView; |