The button? There is no button.

If you're on Android 2.*, the little arrow on the right side (which is used
to show the item list) is part of the spinner's background... except I see
you've specified your own.

The text you see inside the spinner is part of the view provided by the
spinner's adapter. The centering, and text size, or its color, if any,
would need to be provided by the adapter's getView().

-- K

2012/7/26 Evan Ruff <[email protected]>

> Kostya,
>
> Thanks for the response. Just to clarify, the getView in the adapter sets
> the BUTTON? I thought that set the view for the actual menu of items?
>
> Thanks,
>
> E
>
>
> On Thursday, July 26, 2012 8:38:36 AM UTC-4, Kostya Vasilyev wrote:
>>
>> The contents of a spinner is provided by its adapter. Check the layout
>> used by your adapter's getView().
>>
>> -- K
>>
>> 2012/7/26 Evan Ruff <[email protected]>
>>
>>> Hey guys!
>>>
>>> I have a spinner backed up by an ArrayAdapter in my layout. I'd like to
>>> change the look of the spinner button to match the buttons that are next to
>>> it.
>>>
>>> Here is my Spinner xml:
>>>         <Spinner
>>>             android:id="@+id/location_**type_spinner"
>>>             style="@android:style/Widget.**Button"
>>>             android:layout_width="0dp"
>>>             android:layout_height="fill_**parent"
>>>             android:layout_weight=".33"
>>>             android:background="@drawable/**control_bar_background"
>>>             android:gravity="center"
>>>             android:textColor="#FF000000"
>>>             android:textSize="12dp" />
>>>
>>> While the bounds of the button (it fills the width/height/weight
>>> correctly) and the background work, the text is larger and the gravity is
>>> not centered.
>>>
>>> I'm going nuts trying to fix this! What am I missing? Is there a
>>> different style I need to use or something like that?
>>>
>>> Thanks!
>>>
>>> E
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@**
>>> googlegroups.com <[email protected]>
>>> To unsubscribe from this group, send email to
>>> android-developers+**[email protected]<android-developers%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to