I am familiar with the Android PopupMenu ability, but I want a popup that looks like this:
问问题
1699 次
1 回答
4
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();
于 2013-02-12T14:19:16.853 回答