Thursday, July 26, 2012

[android-developers] Spinner Styling - Am I Nuts??

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
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment