问题
On Android 8 - Oreo ProgressDialog
not working, its just showing the circular arrow.
In my application
I know its deprecated in API 26
This behavior of progress dialog
is same for Google's other apps
I have created custom dialog to show progress bar, is there any native solution for that
Device - Nexus 5x
Os - Android 8
回答1:
I just had the same issue with Galaxy S7 with Oreo and it did happen for any ProgressBar
, not just in ProgressDialog
.
Turned out I had turned off "Animator duration scale" in developer options. When I turn it on, I get the animated progress bar again.
回答2:
ProgressDialog
is Deprecated instead of it you can use progressbar
if you want to use progressbar
then the blow code is for you:
DelayedProgressDialog progressDialog = new DelayedProgressDialog();
progressDialog.show(getSupportFragmentManager(), "tag");
use this Library
回答3:
In my case this issue shows up only when battery is low. I found out that it's related to enabling Battery saver mode . see answer here :Progressbar disappears in battery saver mode (Android 5.x)?
来源:https://stackoverflow.com/questions/47770720/progress-dialog-showing-circular-arrow-only-in-android-oreo