This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!