1new ArrayAdapter<String>(context, android.R.layout.simple_list_item_1, student_array) {
2 @Override
3 public View getView(int position, View convertView, ViewGroup parent) {
4 View view = super.getView(position, convertView, parent);
5
6 int color = 0x00FFFFFF; // Transparent
7 if (someCondition) {
8 color = 0xFF0000FF; // Opaque Blue
9 }
10
11 view.setBackgroundColor(color);
12
13 return view;
14 }
15};
16