Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot see View after changing background of TextView
    primarykey
    data
    text
    <p>Okay I have a layout for my <code>ListView</code>'s items:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/draweritemtext" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?android:attr/activatedBackgroundIndicator" android:fontFamily="sans-serif-thin" android:gravity="center_vertical" android:minHeight="?android:attr/listPreferredItemHeightSmall" android:paddingBottom="16dp" android:paddingLeft="16dp" android:paddingRight="16dp" android:paddingTop="16dp" android:textAppearance="?android:attr/textAppearanceListItemSmall" android:textColor="#111" android:textSize="20sp" /&gt; &lt;View android:id="@+id/separator" android:layout_width="fill_parent" android:layout_height="0.2dp" android:background="@android:color/darker_gray" android:visibility="visible" /&gt; &lt;/LinearLayout&gt; </code></pre> <p>So all works fine with this setup. It shows up like this:</p> <pre><code>ITEM ------- ITEM ------- ITEM ------- </code></pre> <p>But I don't want the blue select color from android, so I would like to change it by changing the textviews background to <code>@drawable/drawer_active_selector</code>. Here is my selector:</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_activated="true" android:drawable="@drawable/notquiteverylightgray" /&gt; &lt;item android:drawable="@drawable/white" /&gt; &lt;/selector&gt; </code></pre> <p>And my drawables</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;drawable name="semitransparent_white"&gt;#77ffffff&lt;/drawable&gt; &lt;drawable name="verylightgray"&gt;#eee&lt;/drawable&gt; &lt;drawable name="notquiteverylightgray"&gt;#ddd&lt;/drawable&gt; &lt;drawable name="white"&gt;#fff&lt;/drawable&gt; &lt;/resources&gt; </code></pre> <p>Now it will look like this:</p> <pre><code>ITEM ITEM ITEM ------ </code></pre> <p>The padding is right, but the things I miss are the seperators (The <code>&lt;View /&gt;</code>)</p> <p>How can I get them back?</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.
 

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