I'm using custom layout for list item of listView
that named row.xml
This is my row.xml
file:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:orientation="vertical"
android:descendantFocusability="afterDescendants" >
<TextView
android:id="@+id/label"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:gravity="right"
android:textSize="40sp"
android:focusableInTouchMode="false"
android:clickable="false"
android:focusable="false" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="right|center"
android:orientation="horizontal">
<Button
android:id="@+id/delete_btn"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="5dp"
android:gravity="right|center"
android:text="delete" />
</LinearLayout>
</LinearLayout>
With the above layout, onListItemClick()
method not working,but when i remove the Button
element from layout, it's working correctly.
Please let me to know what's the problem
Thanks