title: Spinner Dropdown Arrow
body: <p>I am trying to obtain a custom Spinner such as this one:</p>
  
  <p><img src="https://i.stack.imgur.com/lkJ4K.png" alt=""></p>
  
  <p>but I was only able to get this:</p>
  
  <p><img src="https://i.stack.imgur.com/PEUWC.png" alt="enter image description here"></p>
  
  <p>As you can see I experience several problems. </p>
  
  <ol>
  <li>Although I added a custom arrow, I still see the original.</li>
  <li>My custom arrow gets shown at every row.</li>
  <li>How do I adjust my custom arrow's dimensions and layout position?</li>
  <li>How do I generate underlined rows?</li>
  </ol>
  
  <p>This is my code:</p>
  
  <p><code>onCreateView()</code>:</p>
  
  <pre><code>Spinner spinner = (Spinner) rootView.findViewById(R.id.spinner);
  this.arraySpinner = new String[]{
      "Seleziona una data",
      "03 Agosto 2015",
      "13 Giugno 2015",
      "27 Novembre 2015",
      "30 Dicembre 2015",
  };
  ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;&gt;(
          getActivity(),
          R.layout.row_spinner,
          R.id.weekofday,
          arraySpinner);
  
  spinner.setAdapter(adapter);
  </code></pre>
  
  <p><code>res/layout/row_spinner.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"
      android:padding="8dp"&gt;
  
      &lt;TextView android:id="@+id/weekofday"
          android:singleLine="true"
          android:textSize="@dimen/textSize"
          style="@style/SpinnerDropdown"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"/&gt;
  
      &lt;ImageView android:id="@+id/icon"
          android:paddingStart="8dp"
          android:paddingLeft="8dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/spinner_arrow"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <blockquote>
    <p><strong>EDIT</strong></p>
  </blockquote>
  
  <p>I've removed the <code>ImageView</code> and added a second <code>Spinner</code>created from Resource:</p>
  
  <pre><code>ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(
          getActivity(),
          R.array.date,
          R.layout.spinner_layout);
  spinnerDate.setAdapter(adapter);
  
  Spinner spinnerTime = (Spinner) rootView.findViewById(R.id.spinnerTime);
  ArrayAdapter&lt;CharSequence&gt; adapterTime = ArrayAdapter.createFromResource(
          getActivity(),
          R.array.ore,
          R.layout.spinner_layout);
  spinnerTime.setAdapter(adapterTime);
  </code></pre>
  
  <p>with this layout:</p>
  
  <pre><code>&lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@android:id/text1"
      android:padding="8dp"
      android:singleLine="true"
      android:layout_height="wrap_content" android:layout_width="match_parent"/&gt;
  </code></pre>
  
  <p>I've added this to my <code>style.xml</code>:</p>
  
  <pre><code>&lt;style name="AppTheme" parent="@style/_AppTheme"/&gt;
  &lt;!-- Base application theme. --&gt;
  &lt;style name="_AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;item name="android:dropDownSpinnerStyle"&gt;@style/SpinnerTheme   &lt;/item&gt;
  
      &lt;item name="android:windowActionBarOverlay"&gt;false&lt;/item&gt;
      &lt;item name="colorPrimary"&gt;@color/ColorPrimary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/ColorPrimaryDark&lt;/item&gt;
  &lt;/style&gt;
  
  ....
  .... 
  ....
  
  &lt;!--Spinner styles 2--&gt;
  &lt;style name="SpinnerTheme" parent="android:Widget.Spinner"&gt;
      &lt;item name="android:background"&gt;@drawable/apptheme_spinner_background_holo_light&lt;/item&gt;
      &lt;item name="android:dropDownSelector"&gt;@drawable/apptheme_list_selector_holo_light&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="SpinnerTheme.DropDown"&gt;
      &lt;item name="android:spinnerMode"&gt;dropdown&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;!-- Changes the spinner drop down item radio button style --&gt;
  &lt;style name="DropDownItemSpinnerTheme" parent="android:Widget.DropDownItem.Spinner"&gt;
      &lt;item name="android:checkMark"&gt;@drawable/apptheme_btn_radio_holo_light&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="ListViewSpinnerTheme" parent="android:Widget.ListView"&gt;
      &lt;item name="android:listSelector"&gt;@drawable/apptheme_list_selector_holo_light&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="ListViewSpinnerTheme.White" parent="android:Widget.ListView.White"&gt;
      &lt;item name="android:listSelector"&gt;@drawable/apptheme_list_selector_holo_light&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="SpinnerItemTheme"
      parent="android:TextAppearance.Widget.TextView.SpinnerItem"&gt;
      &lt;item name="android:textColor"&gt;#000000&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>but there is no result ! I still see this:</p>
  
  <p><img src="https://i.stack.imgur.com/bLGVM.png" alt="enter image description here"></p>
  
  <blockquote>
    <p><strong>EDIT 2</strong></p>
  </blockquote>
  
  <p>I've changed the <code>style.xml</code> into:</p>
  
  <p><a href="http://pastie.org/private/es40xgebcajajltksyeow" rel="nofollow noreferrer">http://pastie.org/private/es40xgebcajajltksyeow</a></p>
  
  <p>and this is what I get: </p>
  
  <p><img src="https://i.stack.imgur.com/TsrDI.png" alt="enter image description here"></p>
  
  <p>Now instead of replacing the dropdown arrow icon I even have a second icon, the holo checkbox (which is working well, getting selected when I choose one item), but still, how do I get only the one that I want??</p>
  
  <p><code>manifest.xml</code>: </p>
  
  <p><a href="http://pastie.org/private/tu0izusbvvxe91lwmh9vnw" rel="nofollow noreferrer">http://pastie.org/private/tu0izusbvvxe91lwmh9vnw</a></p>