-2

I want to underline spinner like this one

enter image description here

tahsinRupam
  • 6,325
  • 1
  • 18
  • 34
Emeny Boudhri
  • 11
  • 1
  • 5

3 Answers3

5

Help Here

style="@style/Base.Widget.AppCompat.Spinner.Underlined"
Ajay Kumar Oad
  • 560
  • 5
  • 15
  • @EmenyBoudhri You can use theme and style as answered here http://stackoverflow.com/a/37113554 – azzits May 09 '17 at 19:59
  • The resource `@style/Base_Widget_AppCompat_Spinner_Underlined` is marked as private in `com.android.support:appcompat-v7` which means that developers of appcompat library may easiliy change or even delete this resource, since it is not supposed to be used outside the appcompat library – arslancharyev31 Jul 30 '17 at 21:49
  • 1
    How to do using programmatically? – Ananta Prasad Mar 25 '19 at 07:13
3

Just Add One View After Spinner like This...

  <Spinner
    android:id="@+id/spinner1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
  />

   <View 
    android:layout_width="match_parent"
    android:layout_height="2dp"
     android:background="@android:color/darker_gray"/>
Vatsal Harde
  • 1,538
  • 3
  • 15
  • 17
0

You have to create your custom BaseAdapter and provide view which you want check this custom-spinner-examples

vivek mahajan
  • 521
  • 3
  • 16