In spinner xml, I'm using:
android:entries="@array/cars"
where cars is list of numeric items.
The spinner automatically align values to left, and I can't find in xml/code how to change it.
In spinner xml, I'm using:
android:entries="@array/cars"
where cars is list of numeric items.
The spinner automatically align values to left, and I can't find in xml/code how to change it.
You can use
TextAlignment
on properties and selectTextEnd
, orandroid:textAlignment="textEnd"
on XML simpleYou have to use a custom view here to give alignment to the Spinner values. Create a CustomView like this answer has created and add
android:gravity
to the TextView asright
.UPDATE:
Set the CustomView to your adapter using