Download attachments: OK button

pull/215/head
M66B 1 year ago
parent daae3d79a9
commit 7d1a791876

@ -146,12 +146,13 @@ public class FragmentDialogDownloadAttachments extends FragmentDialogBase {
return new AlertDialog.Builder(context) return new AlertDialog.Builder(context)
.setView(dview) .setView(dview)
.setNegativeButton(R.string.title_dismiss, new DialogInterface.OnClickListener() { .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
startActivity(intent); startActivity(intent);
} }
}) })
.setNegativeButton(android.R.string.cancel, null)
.create(); .create();
} }
@ -168,9 +169,9 @@ public class FragmentDialogDownloadAttachments extends FragmentDialogBase {
} }
private void updateButton() { private void updateButton() {
Button btn = ((AlertDialog) getDialog()).getButton(AlertDialog.BUTTON_NEGATIVE); Button btn = ((AlertDialog) getDialog()).getButton(AlertDialog.BUTTON_POSITIVE);
if (btn != null) if (btn != null)
btn.setText(remaining.isEmpty() ? android.R.string.ok : R.string.title_dismiss); btn.setEnabled(remaining.isEmpty());
} }
@Override @Override

Loading…
Cancel
Save