arnouf wrote: > Hi all, > > I've a ListActivity. Data are provided by a Thread calling a URL to > load data from a database. The URL returns data from position x to x > +5 . the x value is sent by my application indicating the position of > the last displayed item. > > Now I would like to know, how can I detect when user is on the last > record displayed in my ListView. This can give information to recall > my URL with the new x. > > I tried to implement it in my ArrayAdapter.getView() method, testing > the getPosition() and myArray length...It works well but everytime! > > This should work like GMail app for example (you have 50 last > discussions loaded by default and if you go down after these 50, a new > loading is done). > > What is the good solution?
I do not know if it is "good", but this is what I wrote to handle this situation: https://github.com/commonsguy/cwac-endless/tree One of these days, I will cobble together enough time to add more documentation and a blog post about this... -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---