lv.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView> parent, View view, int position,
Regarding opening a context menu on a short click:
The other solutions posted here didn't work for me because I was using a ListFragment. However the following solution seems to work quite nicely for both a ListFragment and a ListActivity (or just any old listview in general):
public void onListItemClick(ListView l, View v, int position, long id){
l.showContextMenuForChild(v);
}
It's much more simple and elegant. In fact, this is actually how the ListView class itself initiates the context menu on a long click.