-1

which class is need to be implemented for loading data from cloud storage as per visible list items and how to add indeterminate progress bar while loading below listview?(example:listview in google play store)

Asjadaun
  • 23
  • 5

2 Answers2

0

First of all: How the data is loaded has nothing to do with where or how it will be shown in the UI.

To answer your question: The Play Store uses nested instances of RecyclerView. On launching it, a ProgressBar with indeterminate="true" is shown as overlay while data is fetched in background. If a particular list needs to fetch more items, an item containing a ProgressBar with indeterminate=true is appended as item at the end of the list and replaced once more content is available.

To load data in the background there are many ways: Have a look here to get started: https://developer.android.com/training/basics/network-ops/connecting.html

To actually display data see: https://developer.android.com/training/material/lists-cards.html

CrowsNet
  • 93
  • 5
0

First of all use Recyclerview instead of list view, as per recommendations.
For reading further about recyclerview follow the link.

If you want to load image dynamically I recommend you to go with Glide library.

To learn more about Glide, follow link: https://github.com/bumptech/glide

For loading data for list view you have to get data in the form of json, for handling network requests use Retrofit and study from this link.

For making progressbar indeterminant just add indeterminant attribute to progressbar view in xml.

I hope this will solve your problem !!!

Community
  • 1
  • 1
Sukhbir
  • 553
  • 8
  • 23