Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Okay, i think its an issue with your selector. Try removing the state_focused and the state_activated. You could try this for your selector:</p> <pre><code>&lt;!-- Disabled State --&gt; &lt;item android:state_enabled = "false" android:state_focused = "true" android:state_pressed = "true" android:drawable="@android:color/transparent"&gt; &lt;/item&gt; &lt;item android:state_enabled = "false" android:state_focused = "true" android:drawable="@android:color/transparent"&gt; &lt;/item&gt; &lt;!-- Pressed State --&gt; &lt;item android:state_pressed = "true" android:state_focused = "true"&gt; &lt;shape&gt; &lt;solid android:color="@color/blue"/&gt; &lt;/shape&gt; &lt;/item&gt; &lt;item android:state_pressed = "true" android:state_focused = "false"&gt; &lt;shape&gt; &lt;solid android:color="@color/blue"/&gt; &lt;/shape&gt; &lt;/item&gt; &lt;!-- Normal State --&gt; &lt;item android:drawable="@android:color/transparent"&gt; &lt;/item&gt; </code></pre> <p>I found that I needed to use a shape object too instead of <code>android:drawable</code>, because on pre-ICS phones, the whole list will be highlighted that color instead of the pressed list item.</p> <p>You can add in your <code>state_selected</code> code too, but I'm not sure how it will be used. Check out the default selector code for jelly bean for the states they use: <a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/frameworks/base/core/res/res/drawable/list_selector_background.xml?av=f" rel="nofollow">list_selector_background.xml</a>.</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.
    1. This table or related slice is empty.
    1. VO
      singulars
      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