How to change spinner text size?

后端 未结 2 1612
深忆病人
深忆病人 2021-01-15 06:27

I\'d like to learn about spinner and how to change spinner text size and spinner text color.

2条回答
  •  -上瘾入骨i
    2021-01-15 06:50

    The hello-spinner tutorial is very useful.

    http://developer.android.com/guide/tutorials/views/hello-spinner.html

    Add a new XML file to your layout folder.

    android:textColor="#FF8B1500" android:gravity="center"/>

    Change the adapter resource to your new layout file:

    adapter = ArrayAdapter.createFromResource(
                this, R.array.sound, R.layout.spinnerLayout);
    

    `

提交回复
热议问题