How to implement progressBar while loading data?

后端 未结 4 1521
执笔经年
执笔经年 2021-02-06 08:24

I want to implement progressBar like on the picture below.

Right now, I have AsyncTask whic is sperated from fragments classes, and I use that AsyncTask to load data, an

4条回答
  •  我寻月下人不归
    2021-02-06 08:42

    Dude,

    If you really just want a progress bar like the picture you posted, you can simply set the progress bar indeterminate property to true :)

    You can eighter do on code or directly on the xml.

    In code:

    yourProgressBar.setIndeterminate(true);
    

    In your XML, just set the attribute indeterminate to true.

    Here's is a simple layout as an example:

    
    
    
    
    
    

提交回复
热议问题