Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-30 Thread Walaa Mahmoud
Yeah Firstly this code is not original listview code as you said but i worked around the original code to figure out a way to make listview update only current row not previous rows , i read that i could use adapter.add() so it will add row one by one so will not update previous and that what i wan

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-30 Thread Nadeem Hasan
As it has already been pointed, there are several things wrong with that small piece of code. You should go back and read more about listviews in Android. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email t

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-30 Thread Nadeem Hasan
And that too yes. Good catch. I did see the two layouts but was too focused on the issue reported. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Walaa Mahmoud
Firstly i used it this way after trying viewholder and didn't work so i wanted every layout for both send and receive to be separated so when flag true and i'm receiving it should update only current item with the name and FB profile picture of sender and keep previous rows without updating ,here i

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Justin Anderson
Good catch Kostya... I didn't notice the two different layouts until you mentioned it. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware 2012/3/29 Kostya Vasilyev > Note that there are two layouts being used here: > > R.layout.evenbubble > R.layout.oddbubbl

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Kostya Vasilyev
Note that there are two layouts being used here: R.layout.evenbubble R.layout.oddbubble Without overriding getViewTypeCount / getItemViewType in the adapter and returning the right item type... .. the list view will mix up those two layouts when recycling, which would appear as a list of "send"

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Justin Anderson
That its what I was thinking as well... On Mar 29, 2012 2:16 PM, "Nadeem Hasan" wrote: > Justin, > > You are right. In that case, I think the culprit is the "flag". It is > supposed to be true for incoming and false for outgoing. But, it remains > static while listview is building its items. I th

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Nadeem Hasan
Justin, You are right. In that case, I think the culprit is the "flag". It is supposed to be true for incoming and false for outgoing. But, it remains static while listview is building its items. I think this flag should be in the adapter along with message. -- You received this message becau

Re: [android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Justin Anderson
> > The MarkChat.Name.get() returns the same value for all your list items. > That's what I thought at first as well... But I think this list view represents a chat between two people... And so, depending on the item in the list, the OP only wants to return one of two names... I may be wrong, but

[android-developers] Re: Stop listview from updating previous items and only update current items

2012-03-29 Thread Nadeem Hasan
The MarkChat.Name.get() returns the same value for all your list items. That is causing the name to be the same for all items. It should return the name based on the "position" of the item in the adapter. Also, as Justin noted, your ViewHolder usage seems to be incorrect. Try something like bel