如何在弹出AlertDialog中添加ListView,并实现Item
2个回答
2017-10-24
展开全部
您好,调用dialog函数就行了:thisdialog(); dialog函数如下: private void dialog() { // TODO Auto-generated method stub AlertDialogBuilder builder = new Builder(PeopleActivitythis); buildersetMessage("确认删除吗?"); builder如何在弹出AlertDialog中添加ListView,并实现Item
展开全部
您好,调用dialog函数就行了:this.dialog();
dialog函数如下:
private void dialog() {
// TODO Auto-generated method stub
AlertDialog.Builder builder = new Builder(PeopleActivity.this);
builder.setMessage("确认删除吗?");
builder.setTitle("提示");
builder.setPositiveButton("确认", new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
}
});
builder.setNegativeButton("取消", new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
builder.create().show();
}
dialog函数如下:
private void dialog() {
// TODO Auto-generated method stub
AlertDialog.Builder builder = new Builder(PeopleActivity.this);
builder.setMessage("确认删除吗?");
builder.setTitle("提示");
builder.setPositiveButton("确认", new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
}
});
builder.setNegativeButton("取消", new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
builder.create().show();
}
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询