1

I am using the following code to setup my spinner :

 ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
            R.layout.country_code_spinner_item,
            countrySpinnerOptions){
        public View getView(int position, View convertView, ViewGroup parent) {
            View v = super.getView(position, convertView, parent);
            ((TextView) v).setTextColor(Color.parseColor("#808080"));
            return v;
        }
    };

This assigns the default color of the text to "#808080"

Now i have also implemented setOnTouchListener method for this spinner. What i want is although initially the color text of the spinner is 808080. But after the spinner is touched and a new text is chosen from a list. The color now permanently changes to BLACK.

How do i implement this ?

Thanks

rohit sharma
  • 171
  • 1
  • 9
  • please add the onTouchListener also, – Blue_Alien Dec 15 '14 at 15:05
  • you should refer these questions http://stackoverflow.com/questions/9476665/how-to-change-spinner-text-size-and-text-color http://stackoverflow.com/questions/18312043/how-to-change-spinner-text-color – Blue_Alien Dec 15 '14 at 15:07

0 Answers0