title: android: how to disable selected and pressed attributes of parent view in listView
body: <p>I have a listView with custom rows containing buttons and I populate the listView with a custom cursorAdapter. I have set a selector for the button to change the background of it when pressed and it works great when I press on the button. The problem is it also works when I press anywhere else on the row. </p>
  
  <p>I tried to set the parent view's .setPressed, .setSelected, .setFocusable, .setFocusableInTouchMode, .setClickable attributes to false but it did not work.</p>
  
  <p>I also tried to set button's .setDuplicateParentStateEnabled to false but it did not help either.</p>
  
  <p>If you can help me I will be grateful,</p>
  
  <p>Thank you in advance</p>
  
  <p>Let me extend my question: I have the rows without the button (which is the TextView with id of "delete_button" in xml code below) first. When I click another button in the view, the delete buttons slide into the rows and the background of the other TextView (id:list_title_text) changes to a constant color (because I don't want it to be clickable anymore)</p>
  
  <pre><code>&lt;RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/title_rows_relativelayout"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"&gt;
      &lt;TextView
          android:id="@+id/list_title_text"
          android:layout_alignParentLeft="true"
          android:layout_width="wrap_content"
          android:layout_height="50dp"
          android:textSize="25dp"
          android:textColor="@android:color/white"
          android:layout_alignParentRight="true"
          android:background="@drawable/selector_for_list_rows"
          android:paddingLeft="15dp"
          android:paddingBottom="5dp"
          android:paddingRight="15dp"
          android:gravity="center_vertical"
          android:typeface="normal" /&gt;
      &lt;/TextView&gt;
      &lt;TextView 
      android:id="@+id/delete_button"
      android:background="@drawable/selector_for_delete_button"
      android:layout_width="wrap_content" 
      android:layout_height="40dp"
      android:textSize="23dp"
      android:textColor="@android:color/white"
      android:paddingLeft="10dp"
      android:paddingRight="10dp"
      android:gravity="center"
      android:layout_alignTop="@+id/row_icon_background" 
      android:layout_alignParentRight="true"
      android:layout_marginRight="5dp"&gt;
      &lt;/TextView&gt;
   &lt;/RelativeLayout&gt;
  </code></pre>