how to show progress bar(circle) in an activity having a listview before loading the listview with data

后端 未结 12 2484
忘掉有多难
忘掉有多难 2020-11-28 00:18

I have a ListView in my second activity.OnItemClick of it I called a webservice and trying to fetch data. And after that I am moving to third activ

12条回答
  •  甜味超标
    2020-11-28 01:14

    Are you extending ListActivity?

    If so, put a circular progress dialog with the following line in your xml

    
    

    Now, the progress indicator will show up till you have all your listview information, and set the Adapter. At which point, it will go back to the listview, and the progress bar will go away.

提交回复
热议问题