You should use a TableView with a Text/View Entry per server record response inside a TableRowView. Each Item in a TableRow will be spaced horizontally providing multiple columns...
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of pramod.deore Sent: Wednesday, May 25, 2011 4:19 AM To: Android Developers Subject: [android-developers] Re: Updating row dynamically in ListView Hi actually I am getting a string with some delimilater. Now using split() I am split that response. after spliting I am getting string array of size 40. I am not going to display all 40 fields. I will show near about 10 fields. Once again let me explain what I want: Using socket connection I am receiving response from server. I want to display this response in list. This list contains say 10 columns. Suppose first two records as EmpId EmpName MobNo City ..... Gender 1 Pramod 789 Nasik M 1 1 Tom 456 NY M Now suppose next record again for EmpId 1 then other fields will change and it will be: EmpId EmpName MobNo City ..... Gender 1 Deore 789 Nasik M 1 1 Tom 456 NY M Now suppose server send again some data with EmpId which is not exist above then it must have to add this new record.And it will be EmpId EmpName MobNo City ..... Gender 1 Deore 789 Nasik M 1 1 Tom 456 NY M 45 Rob 123 XYZ M Now how to achieve this? On May 25, 12:33 pm, Nikolay Elenkov <[email protected]> wrote: > On Wed, May 25, 2011 at 4:15 PM, pramod.deore <[email protected]> wrote: > > > On May 25, 12:08 pm, Nikolay Elenkov <[email protected]> > > wrote: > >> On Wed, May 25, 2011 at 4:01 PM, pramod.deore <[email protected]> wrote: > >> > Hi Ravi thanks for reply. actually it will becomes more complicated. > >> > Because server is sending data 2-3 times within a second And it will > >> > not be good idea to store data such a frequently. > > >> > Can somebody please provide me a guideline How I can check whether > >> > some key (here Name ) is already exist in listview? > > >> If you don't have much data to deal with it, it might be easier to > >> just replace everything and re-display. It doesn't really matter > >> what exactly changed. > > > Actually I am dealing with huge data. In above code just show a sample > > of three fields but there are more than 40 fields. > > Why is top-posting the norm on this list? Please write your reply *below* > the previous one, so it reads like a conversation. Trimming also helps. > > How are you going to display 40 fields in a ListView? It doesn't really matter > though, you usually care if a particular row/record changed and update/replace > the whole record in your model/adapter. If you want to be able replace a > particular record, use some key (e.g., the employee ID) to search for it, > and update/replace it.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

