Question

I am familiar with the Android PopupMenu ability, but I want a popup that looks like this:enter image description here

Was it helpful?

Solution

Just a heads up, the Android Developers site (http://developer.android.com/index.html) has all of this explained in detail with tutorials. Try this:

AlertDialog.Builder builder = new AlertDialog.Builder(this);

builder.setTitle(title);

builder.setItems(new CharSequence[] {"Copy Text", "Delete", "Details"} , 
    new DialogInterface.OnClickListener() 
    {
        public void onClick(DialogInterface dialog, int which) { /* which is an index */ } 
    }); 
builder.show();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top