In my app I do an async task to download information from my mysql db and then display it in a listview that uses a custom adapter that extends a baseadapter. Each row displays the same 3 columns of information for the object in seperate textviews.
So it looks like
Row1 : TextView1 – TextView2 – TextView3
Row2 : TextView1 – TextView2 – TextView3
Row3 : TextView1 – TextView2 – TextView3
etc..
My question is, rather then having a one large dialog appear at the start of downloading all the information and making the user wait for it to update, is it possible to put a small dialog in each row and once it has updated, display the text where the dialog was?
So it would look like this at the beginning of updating:
Row1 : Dialog
Row2 : Dialog
Row3 : Dialog
Then after recieving all the information for row1:
Row1 : TextView1 – TextView2 – TextView3
Row2 : Dialog
Row3 : Dialog
etc….
Yes it is possible. In fact one of the best practices for lists containing large data like images is to put in a stand in and then display it as soon as it is ready. To accomplish that you will need to create the stand in list, begin the async task to populate it, and upon completing a row call
onProgressUpdate()to place it in the list properly andnotifyDataSetChanged()to display it