How should I increase the spinner list item font size?

后端 未结 5 1637
野的像风
野的像风 2020-12-08 04:27

This is my spinner\'s code:

Spinner food = (Spinner) findViewById(R.id.spinner1);
ArrayAdapter foodadapter = ArrayAdapter.createFromResou         


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 05:00

    Via XML Only

    Just to help others in case they are statically setting their Spinner entries in XML.

    The above answers work if you're creating your Spinner via code but if you're setting your Spinner entries via XML, i.e. using android:entries, then you can adjust the text size and other attributes with the following two theme settings:

    In your res/values/styles.xml

    
    
    
        
    
        
        
    
        
    
        
    
    
    

提交回复
热议问题