ProgressDialog circle not showing in device

人走茶凉 提交于 2019-12-02 12:26:54

问题


I have this ProgressDialog in my activity. I'm using a few devices to test but only in one the loading circle is not showing. The device that it's not showing it's a Moto G4 Plus running android 7.0. Below there is a picture.

I also run the app in a Asus Zenfone 3 running also android 7.0. They both are running android 7.0 but only one don't show the circle.

Here is my code:

import android.app.ProgressDialog;

    private ProgressDialog progressDialog;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    progressDialog = new ProgressDialog(this);
        progressDialog.setMessage("Carregando...");
   }

    private void myMethod(){
            progressDialog.show();
   }

Did anyone had the same problem? Is there a way to solve it and still use the ProgressDialog?


回答1:


Check whether your device is in Power Saving mode (some devices disable animation) or the animation is off in Developer Options.




回答2:


Also, check the color of the circle. I ran into the issue that circle by default was white and background of the dialog also was white.

Here more information how to change the color.



来源:https://stackoverflow.com/questions/44977418/progressdialog-circle-not-showing-in-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!