How to change the Spinner font color?

后端 未结 8 1390
盖世英雄少女心
盖世英雄少女心 2020-12-01 06:34

I\'m having an issue with the Droid X phones where users say that the font color turns out to be white in the spinner, making it invisible unless the users highlight the ite

8条回答
  •  情书的邮戳
    2020-12-01 07:12

    public class ee extends Activity{
    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ww);
    addListenerOnSpinnerItemSelection();
    
    }
    public void addListenerOnSpinnerItemSelection(){
    
        ArrayList array = new ArrayList();
        array.add("item0");
        Spinner spinner1;
        ArrayAdapter mAdapter;
        spinner1= (Spinner) findViewById(R.id.spinner2);
        spinner1= new ArrayAdapter(this, R.layout.spinner_item, array);
        spinner1.setAdapter(mAdapter);
    
    }  
    }
    

    and in xml res/layout add new xml file: type layout, spinner

    (in spinner_item.xml)

    
    
    

提交回复
热议问题