Note that there are some explanatory texts on larger screens.

plurals
  1. POSpinner does not apply dropDownSelector attribute
    primarykey
    data
    text
    <p>I'm using spinner and want to add spinner - to change behavior depends of states(focused, pressed)</p> <p>sample project is here <a href="https://github.com/vovs/spinner_issue" rel="nofollow noreferrer">https://github.com/vovs/spinner_issue</a></p> <p>My code:</p> <p><strong>activity_main.xml</strong></p> <pre><code>&lt;Spinner android:id="@+id/spinner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="30dp" android:spinnerMode="dropdown" android:dropDownSelector="@drawable/spinner_state" /&gt; </code></pre> <p><strong>spinner_state.xml</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;item android:state_enabled="false" android:drawable="@color/black" /&gt; &lt;item android:state_pressed="true" android:state_enabled="true" android:drawable="@color/red" /&gt; &lt;item android:state_focused="true" android:state_enabled="true" android:drawable="@color/red" /&gt; &lt;item android:state_enabled="true" android:drawable="@color/gray" /&gt; &lt;/selector&gt; </code></pre> <p><strong>AndroidManifest:</strong></p> <pre><code>&lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" /&gt; </code></pre> <p>So, if I run app in emulator Android 4.0.2 API 14 and try to select some item or scroll using wheel of my mouse no any effect, that I set in selector(when press or scrolling - items should be red, but it is blue - default for ICS color).</p> <p>For Android 2.2 API 8 when press or scroll using wheel(in this case state is focused) color is yellow[orange](default color for Android 2.2)</p> <p>How to enable selector for spinner?</p> <p><img src="https://i.stack.imgur.com/7ZGFW.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload