disable cancel button instead of hiding it on cancel prevention
This commit is contained in:
@@ -145,7 +145,7 @@ public class ProgressDialogFragment extends DialogFragment {
|
|||||||
|
|
||||||
mPreventCancel = preventCancel;
|
mPreventCancel = preventCancel;
|
||||||
final Button negative = ((ProgressDialog) getDialog()).getButton(DialogInterface.BUTTON_NEGATIVE);
|
final Button negative = ((ProgressDialog) getDialog()).getButton(DialogInterface.BUTTON_NEGATIVE);
|
||||||
negative.setVisibility(preventCancel ? View.GONE : View.VISIBLE);
|
negative.setEnabled(mIsCancelled && !preventCancel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user