• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Update the List View at run time

aptgopal

Newbie
Hi

I am creating a new android application in that app I want add the list content from the Edit text

That means I have a Edit text field,Button,List View I write some thing in edit text and at the time of button clicking I want to add the content in the list view

Please any one help me

Thanks in Advance
 
Try using an Adapter ... for example an ArrayAdapter ... to hold the contents of your list. Use the add() method to add an additional item to the collection.

Just be sure to remeber the following:
1) Fetching data or processing data can happen on any thread you want, but Adapter modifications need to happen on the UI thread.
2) call notifyDataSetChanged() when adding new or modifing data.
3) call notifyDataSetInvalidated() if there is no data available.
 
Back
Top Bottom