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
|
private class CustomListAdapter extends ArrayAdapter<String> {
public CustomListAdapter(Context context, int textViewResourceId,
String[] objects) {
super(context, textViewResourceId, objects);
this.notifyDataSetChanged();
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = getLayoutInflater();
View row = inflater.inflate(R.layout.items_listview,
parent, false);
TextView matiereText = (TextView) row.findViewById(R.id.TextView01);
TextView noteText = (TextView) row.findViewById(R.id.TextView02);
;
matiereText.setText(liste_matiere[position]);
noteText.setText(note[position]);
return row;
}
} |