菜鸟学习Andriod-弹窗

时间:2022-10-19 05:34:15

菜鸟学习Andriod-弹窗

菜鸟学习Andriod-弹窗

return new AlertDialog.Builder(ZyScreenSaver.this).setIcon(
R.drawable.ic_launcher).setTitle("退出屏保").setMessage(
"是否退出屏保").setPositiveButton("确定",
new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
finish();
}
})
.setNegativeButton("取消",
new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
removeDialog(1); }
})
.create();