AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("尊敬的用户");
builder.setMessage("你真的要卸载我吗?");
builder.setPositiveButton("确定", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
});
builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
});
AlertDialog alert = builder.create();
alert.show();
AlertDialog.Builder builder=new AlertDialog.Builder(InfoActivity.this);
builder.setTitle("头像");
builder.setNegativeButton("取消", new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
String[] items=new String[]{"相册上传","拍摄上传","下载头像"};
builder.setItems(items, new DialogInterface.OnClickListener(){
@Override
public void onClick(DialogInterface dialog, int which) {
if(which == 0){
//从相册获取图片
// Intent intent = new Intent(Intent.ACTION_PICK, null);
// intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, IMAGE_UNSPECIFIED);
// startActivityForResult(intent, PHOTO_ZOOM);
}
else if(which == 1){
//从拍照获取图片
// Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
// intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(Environment
// .getExternalStorageDirectory(),"temp.jpg")));
// startActivityForResult(intent, PHOTO_GRAPH);
}
else if(which == 2){
// Matrix m = image.getImageMatrix();
}
}
});
builder.create().show();