tiper / MaterialSpinner

Implementation of a Material Spinner for Android with TextInputLayout functionalities
Apache License 2.0
130 stars 30 forks source link

Text alignment #35

Open holgerschlegel opened 3 years ago

holgerschlegel commented 3 years ago

I want to align the text of the select item centered. The set spinner adapter is created with a custom layout with a text view using android:textAlignment="center". That adapter shows the item text centered in the standard Android Spinner view.

The items in the popup are centered as expected, but the selected item is shown aligned left. Tried using android:textAlignment="center" directly on the material spinner seems to have no effect.

I also tried settings android:gravity="center" on the spinner. That centers the item text, but also centered the hint text in the border above. But I want the hint text to remain left aligned.

Not sure if I'm to blind to find the correct attribute or if it is not working.