Activity
class code:
conversationList = (ListView)findViewById(android.R.id.list);
ConversationArrayAdapter conversationArrayAdapter=new Conver
use the below code inside button tag in custom row layout of listview
android:focusable="false"
android:clickable="false"
Use android:descendantFocusability
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="80dip"
android:background="@color/light_green"
android:descendantFocusability="blocksDescendants" >
Add above in root layout
The problem is that your layouts contain either focusable or clickable items. If a view contains either focusable or clickable item the OnItemCLickListener won't be called.
Click here for more information.
Please post one of your layout xmls if that isn't the case.
Android:autoText attribute also makes TextView auto focusable.
I had the same issue, I was using a style for my texts in the row layout that had the "focusable" attribute. It worked after I removed it.
All of the above failed for me. However, I was able to resolve the problem (after many hours of banging my head - Google, if you're listening, please consider fixing what I encountered below in the form of compiler errors, if possible)
You really have to be careful of what android attributes you add to your xml layout here (in this original question, it is called list_items.xml). For me, what was causing the problem was that I had switched from an EditText view to a TextView and had leftover attribute cruft from the change (in my case, inputType). The compiler didn't catch it and the clickability just failed when I went to run the app. Double check all of the attributes you have in your layout xml nodes.