我想在弹出屏幕中启动一项活动。有什么快速改变的建议吗?
new AlertDialog.Builder(SearchResults.this)
.setTitle("Refine")
.setItems(/*catNames*/, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
/* User clicked so do some stuff */
String catName = catNames[which];
String categoryIds = subCats.get(catName);
})
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
//do nothing just dispose
}
})
.create().show();