How to change the Spinner font color?

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

    Here is more appropriate way guys,

    First find the "simple_spinner_item.xml" file in your system, Follow the below path, C:\Users[username]\AppData\Local\Android\sdk\platforms[android-23]\data\res\layout

    Now copy the content of "simple_spinner_item.xml" file

    Second create the custom_spinner.xml file in your project res\layout folder

    and paste the copied content in recently created file

    Here is the sample:

    res\layout\custom_spinner.xml

    
    
    

    Here is the set adapter code:

    Spinner ddlArea = (Spinner) findViewById(R.id.ddlArea);
    
    ddlArea.setAdapter(new ArrayAdapter(this, R.layout.custom_spinner, areaList));
    

    Where areaList is the List

    Thanks, Ejaz Waquif

提交回复
热议问题