Android spinner divider not working -


i have spinner white background. want set divider between spinner items not working.

i have done far.

in spinner.xml under layout

<spinner     android:id="@+id/spinner"     style="@style/spinner_style"     android:layout_width="0dp"     android:layout_height="@dimen/height"     android:layout_weight="1.5"      android:gravity="center"     /> 

in styles.xml

<style name="applicationtheme" parent="@android:style/theme.holo.light">     <item name="android:dropdownlistviewstyle">@style/spinner_style</item> </style>  <style name="spinner_style" parent="android:widget.listview.dropdown">     <item name="android:background">@drawable/gradient_spinner</item>     <item name="android:popupbackground">#ffffff</item>     <item name="android:divider">@color/black</item>     <item name="android:dividerheight">2dp</item> </style> 

gradient_spinner.xml

 <?xml version="1.0" encoding="utf-8"?> 

<item><layer-list>         <item><shape>                 <gradient android:angle="90" android:endcolor="#ffffff" android:startcolor="#ffffff" android:type="linear" />                  <stroke android:width="1dp" android:color="#000000" />                  <corners android:radius="4dp" />                  <padding android:bottom="3dp" android:left="3dp" android:right="3dp" android:top="3dp" />             </shape></item>         <item><bitmap android:gravity="right" android:src="@drawable/spinner_arrow" />         </item>              </layer-list></item> </selector> 

it's working except divider. what's wrong code. in advance.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -