I have a spinner. When user clicks on it a dialog box appears with several rows and text inside that rows to choose from. The default text inside spinner is Select facility. And the first row text is the same i.e. select facility. Now what I want is to change the text color in first row in spinner dialog box i.e. the color of select facility.
How can I achieve this?
Here is the code where I believe I can change it.
if (position == 0 && hideFirstText) {
((TextView) convertView).setText(R.string.select_facility);
convertView.setBackgroundResource(R.color.light_green);
return convertView;
}
Here is what I already tried
((TextView) convertView).setTextColor(4737352);
But above solution completely removes the first row text.
I also tried this
convertView.setTextColor(4737352);
But convertView does not have setTextColor() method.
you should override the getView method,,like this