public AlertDialog getFinishAlertDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
String msg1 = getResources().getText(R.string.upload_cancel_msg1).toString();
String msg2 = getResources().getText(R.string.upload_cancel_msg2).toString();
builder.setTitle(getResources().getString(R.string.upload_cancel_title));
String msg = uploadData.size() + msg1 + " " + (uploadFileCount) + msg2;
builder.setMessage(msg);
builder.setPositiveButton(R.string.Yes,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
isCanceled = true;
UploadStatusActivity.this.finish();
}
});
builder.setNegativeButton(R.string.No,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
isCanceled = false;
resumeUpload();
}
});