I have a ListView in my Activity.
I am trying to catch both a click and a long click (which should bring
up a context menu).
ListView lv = (ListView) findViewById(R.id.MyListView);
...
lv.setOnItemClickListener(this);
lv.setOnCreateContextMenuListener(this);
...
I notice that if I have both the click and long click listeners up, I
won't ever get the long click listener (i.e. the context menu). If I
remove the setOnItemClickListener() call, i get a call into
@Override
public void onCreateContextMenu(ContextMenu menu, View v,
ContextMenu.ContextMenuInfo menuInfo) {
Any ideas on how to get both calls?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en