0

I have a list view. I have added an onclick method in the adapter getview function for the row of listview and it works fine.

Now I have added a context menu:

registerForContextMenu(lv);

and have implemented onCreateContextMenu and onContextItemSelected

But the longclick is not working . It is taken as single click and does the onclick functionality

I even added android:longClickable="true" for the xml file inflated for the listview row.

It also didn't help.

Dave Newton
  • 158,873
  • 26
  • 254
  • 302
png
  • 4,368
  • 7
  • 69
  • 118
  • can You show what You have done? – Opiatefuchs Sep 25 '14 at 12:27
  • if the on click method is still then in the getview method of your adapter then the long click of item wont be working. As the child is hiding click event of parent – BSKANIA Sep 25 '14 at 12:27
  • http://stackoverflow.com/questions/5551042/onitemclicklistener-not-working-in-listview-android/14372750#14372750 check this. – BSKANIA Sep 25 '14 at 12:29
  • it is a different issue where onclick is not working because of some item being focussable – png Sep 25 '14 at 12:36

0 Answers0