I have an implementation that just like gmail application, but have
met some problem in some case. And I tested it on the real device of
the gmail application. Seems they are caused by the same reason.
ListView.

Just go to the gmail application, scroll down to the last visible
mail, and at this time, make sure the "loading conversation" at the
bottom is still on. Then long press the last one mail, and the context
menu show up. Then wait for the background email loading finish ( you
can see that the scrollbar move up ). Then you do some action in the
context menu, say "read the mail". However, the show up mail is not
the one that I long pressed.

After some debug, I found that this should be related to ListView and
its adapter's getView method, the "convert view" is reused when the
context menu is shown, and in that case the listItemview has some
field to record the index of the mail, while getView method is
invoked, the field has been changed.

Any one can provide a better way to solve this problem ?

Thanks.

-- 
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 this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to