I got a textviews in a custom listview, I know how to set the text color so all the textviews in the list will be changed. But Now, I just want one of the particular view to change color, say there is 10 item in listview, I just want the second textview color to be changed and the rest remain the same. any idea? thanks so much for all the help~
public class CheckWinNoAdapter extends ArrayAdapter<String> {
private final Context context;
private String[] values;
public CheckWinNoAdapter(Context context, String[] values) {
// TODO Auto-generated constructor stub
super(context, R.layout.list_draw, values);
this.context = context;
this.values = values;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rowView = inflater.inflate(R.layout.list_draw, parent, false);
TextView textView1 = (TextView) rowView.findViewById(R.id.chk_tv1);
textView1.setText(values[position]);
}
}
In Get View Do it like this: