Skip to content
Advertisement

How to center simple_spinner_dropdown_item in Android Studio?

I want to center the text of my simple_spinner_dropdown_item element, so I got this solution:

JavaScript

However, this is just working for the simple_spinner_item where all the dropdown items are way to tight. But when ever I replace it by simple_spinner_dropdown_item the centering is no longer working.

I guess the answer lies in this line, but I dont know how to adapt:

JavaScript

Thanks!

Advertisement

Answer

In your XML file where you have declared the <Spinner>...</Spinner> element try to add this attribute (to the spinner) :

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement