Text color of a closed spinner

前端 未结 6 1347
孤独总比滥情好
孤独总比滥情好 2020-12-01 16:03

I understand that the closed spinner is actually a View, I think. But I am guessing it has a TextView there somewhere to show the text. How do I

6条回答
  •  眼角桃花
    2020-12-01 16:33

    to do it programatically you have to extend the adapter class, something like:

        ArrayAdapter adapter = new ArrayAdater(this){
            @Override
            public View getView(final int position, View convertView, ViewGroup parent) {
               View v = super.getView(position, convertView, parent);           
               // change the color here of your v
               v.  ... etc. etc        
            }
        }
    

提交回复
热议问题