Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a line at the bottom of spinner as like edittext in android

Tags:

android

Hello I am making demo application in which i am using EditText in which a line appears at the bottom that is ok but it is not in case of spinner.

How this is possible to do ?

layout.xml

<EditText     android:id="@+id/twitterEditText"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_marginTop="15dp"     android:hint="@string/twitter_account"     android:inputType="textWebEmailAddress" />   <Spinner     android:id="@+id/countrySpinner"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_marginTop="15dp"     android:hint="@string/country" />  <Spinner     android:id="@+id/stateSpinner"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_marginTop="15dp"     android:hint="@string/state" />  <Spinner     android:id="@+id/citySpinner"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_marginTop="15dp"     android:hint="@string/city" /> 

enter image description here

like image 830
N Sharma Avatar asked Nov 01 '14 18:11

N Sharma


1 Answers

I just faced the same Problem and after researching for a while the answer is quite easy:

    <Spinner         ...                     style="@style/Widget.AppCompat.Spinner.Underlined"         ... /> 
like image 140
Angelo Avatar answered Sep 21 '22 01:09

Angelo