I have an existing ListView
, and when I long-click an Item I would like to see this kind of dialog:
For now I'm using a simple Android dialog with Horizontal buttons.
Is there a simple way to implement this behaviour and get the user result back (i.e. the user clicked "Edit" or "Delete"), or do I need to create a ListView activity again? The screen shot is from another application and I really don't know how the author implemented this.
Any sample code would be highly appreciated :)
I found this: Styling Text in a Dialog List
and This: http://developer.android.com/guide/topics/ui/dialogs.html#AddingAList
and also this by @user3218281 (in the comments): Create a Context Menu when Click Long in a Custom ListView