android - need to reduce spinner font size and width -
i need reduce font size , width of spinner means need small spinner.below copy code of spinner.
my code:in main.xml:
<spinner android:id="@+id/fromspinner" android:layout_width="100dp" android:layout_height="30dp" android:layout_marginleft="50dp" android:layout_margintop="-20dp" android:prompt="@string/country_prompt" android:entries="@array/from_spinner"/>
in strings.xml:choose country
<string-array name="from_spinner"> <item>chennai</item> <item>salem</item> <item>delhi</item> <item>mumbai</item> </string-array> `
you need use custom view , inflate using adapter full control.
if define array in strings.xml , assign entries have limited control. can have control using html format in xml itself.
for example: bolding entry (this works)
<item><b>chennai</b></item>
i don't know if work size try out....
<item><small>chennai</small></item> <item><big>salem</big></item>
Comments
Post a Comment