Simone,

ListView has methods for getting indices of first / last visible item. Since only a few can fit on the screen, doing a linear search to find the right list item is still pretty efficient.

-- Kostya

13.09.2010 0:23, Simone пишет:
Ok, thanks. But I can say for sure that the list is not gonna be 2000
items long ;)
Simone

On 12 Set, 19:00, Mark Murphy<mmur...@commonsware.com>  wrote:
On Sun, Sep 12, 2010 at 12:52 PM, Simone<simone.russ...@gmail.com>  wrote:
Well, the view isn't long (average 5 elements, maximum 20).
What do you suggest?
Other than "rethink your approach", I don't have a suggestion off the
top of my head. I'm just telling you that if your maximum goes from 20
to 2000, and the user scrolls to the bottom, you're going to have
memory problems.

--
Mark Murphy (a Commons 
Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

Android Training...At Your Office:http://commonsware.com/training


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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