When creating an adapter for your Spinner, give a custom layout instead of a predefined
Create an xml named spinner_row.xml
<?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/cust_view" android:layout_width="match_parent" android:textColor="@color/black" android:textSize="12dp" android:layout_height="36dp" android:gravity="left|center_vertical"/>
Here you can change the color Size of the text, as well as the width and height of the elements in the spinner by changing this text box
Use it this way when creating an Adapter
ArrayAdapter<String> adapter=new ArrayAdapter<String>(context, R.layout.spinner_row,yourlist);
The last task is ordinary
spinner.setAdapter(adapter);
Hope this helps you.
source share