Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the default text padding in spinner

Tags:

android

I have a spinner and a textview with style like spinner. I want to align the text in both, but I do not know how much padding the text in the spinner has.

enter image description here

like image 441
SpyZip Avatar asked Jan 30 '14 12:01

SpyZip


1 Answers

One thing that you could find in Android Styles is,

<style name="Widget.Holo.TextView.SpinnerItem" parent="Widget.TextView.SpinnerItem">
    <item name="android:textAppearance">@style/TextAppearance.Holo.Widget.TextView.SpinnerItem</item>
    <item name="android:paddingStart">8dp</item>
    <item name="android:paddingEnd">8dp</item>
</style>

It shows padding is 8dp each on start and end.

Note: If 8dp look lesser to you, may be you should also look for padding on spinner itself. Like Padding of Spinner item + Padinng of text = What you want.

Hope it works for you.

like image 56
umair.ali Avatar answered Sep 30 '22 04:09

umair.ali