Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Update data in a Listview

 
Pramod P Deore
Ranch Hand
Posts: 632
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic