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)
2 Answers
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

- 93
- 5
-
thanks for hint but i have 5 months of experience (starter) its too much for me. – Asjadaun Feb 15 '17 at 16:38
-
okay no problem, maybe clarify what you need then so i can help. :) – CrowsNet Feb 15 '17 at 16:42
-
will u please help if i don't get to the code afterwards. – Asjadaun Feb 15 '17 at 16:47
-
i can try, although i am not sure what you want to achieve. – CrowsNet Feb 15 '17 at 16:52
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 !!!