1

I'm using the EndlessAdapter to load a list of users from network and now I want to set the event onLongClick on each item of the list but I can't. I have set the onClick but if I implement the onLongClick it never launches this event and is launched the normal onClick event instead of onLongClick.

Thank you very much!

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
scuencag
  • 664
  • 4
  • 11

1 Answers1

3

http://developer.android.com/reference/android/view/View.OnLongClickListener.html

And again...

Build a custom Adapter that uses your data...

Whenever you want to do processing with the views in a ListView you need to create a custom adapter that will handle your logic implementation and pass that information to the views as necessary.

Example

http://android.vexedlogic.com/2011/04/02/android-lists-listactivity-and-listview-ii-%E2%80%93-custom-adapter-and-list-item-view/

JoxTraex
  • 13,423
  • 6
  • 32
  • 45