if (max != 0) {
mDialog.setMax(max);
}
}
if (withButton) {
<BUG>mDialog.setButton(DialogInterface.BUTTON_POSITIVE, getString(android.R.string.ok),

new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {</BUG>
if (getActivity() == null) {

if (max != 0) {
mDialog.setMax(max);
}
}
if (withButton) {
mDialog.setButton(dialogButton, getString(android.R.string.ok),
(dialog, which) -> {
if (getActivity() == null) {
