how do you set the spinner text color?

前端 未结 6 1127
庸人自扰
庸人自扰 2020-12-03 07:16

I have been unable to set the color on the spinner widget. How is this styled?

\"SpinnerText\"

6条回答
  •  孤街浪徒
    2020-12-03 07:31

    Simple and crisp ....

    private OnItemSelectedListener your_spinner _name= new AdapterView.OnItemSelectedListener() {
        public void onItemSelected(AdapterView parent, View view, int pos,
                long id) {
    
            ((TextView) parent.getChildAt(0)).setTextColor(Color.BLUE);
    
    
        }
    
        public void onNothingSelected(AdapterView parent) {
    
        }
    };
    

提交回复
热议问题