Holly
Holly

Reputation: 1976

How can i change text size in an android spinner?

Hi i have an android spinner populated from and array that i want to increase the text size of when it actually pops up. See at the moment it looks like this when it expands:

enter image description here

Which on an actual device is impractically small and doesn't look very good. I've tried changing the spinner xml properties But it doesn't seem to make a difference at all.

<Spinner
    android:id="@+id/frequencyspinner"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textSize="18sp"
    >

So how should i be altering the size/ centre of gravity for spinner choices?

Upvotes: 2

Views: 5681

Answers (1)

Nick Campion
Nick Campion

Reputation: 10479

Here is a tutorial that shows you how to set the layouts of the different rows. What you'll need to do is create an array adapter that uses a custom view layout for the different rows. The example is pretty good and I'm sure there are others. Ask more if you have questions.

Upvotes: 2

Related Questions