I have a listview with button and text as row elements. I want on scrolling only button should have the focus and not the entire list. But always the entire list has the focus and not the button. Also, if the button has the focus then will the listview onItemSelected method be called ?
Listview in main.xml
<ListView
android:id="@+id/episodes_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:choiceMode="singleChoice"
android:clickable="true" />
Child items added in row.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="afterDescendants" >
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:ellipsize="end"
android:focusable="true"
android:gravity="left|center"
android:singleLine="true"
android:textColor="#000000"
android:textStyle="bold" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/selector_btn_popup_play"
android:gravity="center"
android:text="@string/play"
android:textColor="@drawable/selector_btn_text_color_light" />
</LinearLayout>