wood burning stoves 2.0*
The moose likes Android and the fly likes Update data in a Listview Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Update data in a Listview" Watch "Update data in a Listview" New topic
Author

Update data in a Listview

Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 629

Hi all, In my application I am getting continuous data through socket connection. I want to display this data in listview which will update automatically as data changes which is coming from socket connection. I have following code:




Now using this there is update only in one row. Means suppose server send one record then it is displayed as



EmpId Name MobNo
1 Pramod 789




But suppose after some time socket receive new record then it must be added as



EmpId Name MobNo
1 Pramod 789
2 Ulf 456 //here this record is added


If next time record comes with same EmpId then existing records value must change as


EmpId Name MobNo
1 Rob 456 //this time this empId record is changed.
2 Ulf 456




But in my exising code data is updated only in one row. Means it creates only one row and if data changed then it is reflected in that row. How to solve this issue? Thanks in advance

Life is easy because we write the source code.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Update data in a Listview