disable cancel button instead of hiding it on cancel prevention

This commit is contained in:
Vincent Breitmoser 2014-10-26 22:25:44 +01:00
parent 5ce89c4af8
commit ce58eb4b03

View File

@ -145,7 +145,7 @@ public class ProgressDialogFragment extends DialogFragment {
mPreventCancel = preventCancel;
final Button negative = ((ProgressDialog) getDialog()).getButton(DialogInterface.BUTTON_NEGATIVE);
negative.setVisibility(preventCancel ? View.GONE : View.VISIBLE);
negative.setEnabled(mIsCancelled && !preventCancel);
}
@Override