Prova fix su dialog progress
This commit is contained in:
parent
79afe0155b
commit
48548b7c92
@ -76,7 +76,7 @@ public abstract class BaseFragment extends Fragment {
|
|||||||
if (progressOpened) {
|
if (progressOpened) {
|
||||||
this.progressOpened = false;
|
this.progressOpened = false;
|
||||||
requireActivity().runOnUiThread(() -> {
|
requireActivity().runOnUiThread(() -> {
|
||||||
mCurrentProgress.dismiss();
|
mCurrentProgress.dismissAllowingStateLoss();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,10 +51,12 @@ public class DialogProgressView extends DialogFragment {
|
|||||||
mBindings.progressBar.setIndeterminate(isIndeterminateProgress());
|
mBindings.progressBar.setIndeterminate(isIndeterminateProgress());
|
||||||
if (!isIndeterminateProgress()) mBindings.progressBar.setMax(100);
|
if (!isIndeterminateProgress()) mBindings.progressBar.setMax(100);
|
||||||
|
|
||||||
return new MaterialAlertDialogBuilder(requireContext())
|
var alertDialog = new MaterialAlertDialogBuilder(requireContext())
|
||||||
.setView(mBindings.getRoot())
|
.setView(mBindings.getRoot())
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
||||||
.create();
|
.create();
|
||||||
|
alertDialog.setCanceledOnTouchOutside(false);
|
||||||
|
return alertDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
android:orientation="vertical" android:layout_width="match_parent"
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
app:cardCornerRadius="12dp"
|
app:cardCornerRadius="16dp"
|
||||||
app:cardElevation="0dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user