Long Press ListView item to open AlertDialog

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Long Press ListView item to open AlertDialog

Postby abhishekrs » Thu Dec 10, 2009 9:02 pm

Hi guys,

I am trying to implement long press on listview items that opens a multi choice AlertDialog. I want to then use the selections as needed.

I am not able to figure out the long press function on listview that would launch the alert dialog.

Please help!


Posts: 3
Joined: Tue Aug 11, 2009 4:10 pm


Postby Droid123 » Fri Dec 11, 2009 12:33 am

use onCreateContextMenu and onContextItemSelected. It works very similar to the Menu

Either that or implement the interface onItemLongClick and build you own dialog within onCreateDialog
Experienced Developer
Experienced Developer
Posts: 77
Joined: Sat Nov 21, 2009 1:21 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests