Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - How to add a bottom (focused) border to spinner?

How can I add a bottom border to my spinner, like the Google Add new contact (see image)?
Then, when I click on the spinner, in Google Add new contact, the border becomes blue.

My spinner has this code:

    <Spinner
        android:id="@+id/spinner1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:entries="@array/insert_type"
        android:prompt="@string/insert_type_title"/>

Add contact screenshot

like image 921
simone_s1994 Avatar asked Aug 17 '15 16:08

simone_s1994


1 Answers

Late to the party, but you can use style="@style/Widget.AppCompat.Spinner.Underlined

like image 117
chessdork Avatar answered Nov 07 '22 12:11

chessdork