tags:

views:

18

answers:

1

Hi all! I have build an application in android. This app needs to display a list of text, but the list of text increase continuously. It means user can see increased list of text. Each text is separated by a horizontal row. It looks like google market when market try to show list of applications. How can i do in this situation ?

+1  A: 

You didn't mention where the data came from but let's suppose that you have an ArrayList of your model Text.

Steps:

  • Add a ListView to your layout
  • Extend ArrayAdapter
  • Set this new adapter to your ListView
  • Modify the array adding/removing new stuff
  • Notify the ListView that the data has changed using the adapter's notifyDataSetChanged() method.
Macarse
hi Macarse! Thanks for your answer! I mean my list can change continuously but users don't have to wait. It looks like google market when market try to show applications on a category! Thanks.
Thành Lê
@Nguyên Thành: If you are willing to do something like that I would recommend you search for `Endless Adapter`. It's a piece of code done by Mark Murphy which does exactly that.
Macarse
Thanks! I think i have what i need. Thanks Macarse!
Thành Lê