Hi guys, how are you?

I have a problem in my application's ListView.
Each item in the ListView can be created by different widgets, some have
pictures, the layout is different in each case, some have images, others
have buttons, etc..

All of them have actions like onClick and onLongClick - being in the widget
itself or in a button.

The cost to create each element is high, and the performance is a little
bit low. So, I decided to store these items in a HashMap <Key, MyWidget>
and whenever you create a new item, make sure if it is already inserted in
my "cache" verifying by a Key
So far so good, it works in order to get these items and recycles them,
except that when I perform some action, it usually does not work.

The itens doesn't longer detects the onClick, the onLongClick until it goes
to outside the viewing area of the ListView. For example. I tap on the
picture to open it and nothing happens. But when I take a scroll up or
down, when that picture out of my sight, the app displays the picture with
the viewer. If I hit a 3 or 4 times, when I move the scroll, the viewer
will be opened 3 or 4 times .. = /

Does anyone have any idea why this happens?

thanks!

-- 
Elison José Gracite Lusvardi

-- 
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