Adding items to listview dynamically.....

Quickly share your Android Code Snippets here...

Adding items to listview dynamically.....

Postby ayyanababu » Wed Feb 17, 2010 11:13 am


Can any one help me to explain how to take data that was typed in EditText and by clicking add in that window should carry to previous activity listviews item.
here i need to do.
1)creating listview in one Activity
2)creating edit text and Addbutton in another Activity
3)By clicking addbutton in 2nd Activity it should display in 1st Activities listview.

Can anyone explain how to do the above two steps...please...
Posts: 5
Joined: Mon Jan 25, 2010 11:29 am


Postby panini » Sat May 01, 2010 1:36 am

follow the steps u can get the solution.

in the second activity u have added edit text and button by clicking that button get the data entered in the edit text and using intent send the data to the previous activity.. then in the first activity using intent get the data entered in the second activity add it to an array and display that array in the list view.

if u still find difficulty in doing this mail me on can send u the sample code for u r problem.
Posts: 2
Joined: Tue Feb 23, 2010 2:44 am


Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 6 guests