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!

Thanks,

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

Top

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
Droid123
Experienced Developer
Experienced Developer
 
Posts: 77
Joined: Sat Nov 21, 2009 1:21 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests