I am using a Custom CursorAdapter that overrides newView() and bindView() to show a custom ListView.
I am inflating the row layout xml file and binding a OnClickListener to the view passed as argument to bindView():
public void bindView(View view, Context context, Cursor cursor) {
view.setOnClickListener(new OnClickListener() { }
...
}
I am also using a relative layout in the row xml:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingTop="10px"
android:paddingBottom="10px"
android:paddingLeft="10px"
android:paddingRight="10px"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
>
<TextView android:id="@+id/episode_title_text" xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:textSize="20px"
android:layout_weight="1"
/>
</RelativeLayout>
My problem is when I click the items in the list, nothing happens, OnClickListener.onClick() is never called.
Any ideas on what the problem might be?
Thank you.