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" bubbles or a list of "receive" bubbles. The view type presumably should be based on "flag", which in turn, as was already noted, presumably should depend on the item's position, and a data structure lookup to determine if it's a "send" bubble or a "receive" bubble. -- K 30 марта 2012 г. 0:49 пользователь Justin Anderson <[email protected]>написал: > That its what I was thinking as well... > On Mar 29, 2012 2:16 PM, "Nadeem Hasan" <[email protected]> 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 think this flag should be in >> the adapter along with message. >> >> -- >> 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 > -- 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

