How to change the Spinner font color?

后端 未结 8 1385
盖世英雄少女心
盖世英雄少女心 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:09

    You could try this approach too wherein you add 2 new Layout Resource Files

    1. Custom_spinner_list_item
    2. Custom_spinner_dropdown_item

    and use them in the code .

    String spin_arry[] = new String[str_vec.size()];
    str_vec.copyInto(spin_arry);
    ArrayAdapter adapter =
        new ArrayAdapter(this,R.layout.custom_simple_spinner_item, spin_arry);
    adapter.setDropDownViewResource(R.layout.custom_spinner_dropdown_item);
    

    custom_spinner_list_item.xml

    
    
    
    
    

    custom_spinner_dropdown_item.xml

    
    
    
    
    

    Happy Coding !! :)

提交回复
热议问题