devstudent wrote:
> What would be the best way to accomplish this with the Efficient
> Adapter example? My implementation involves the getView method. I
> check if the current position is the last row, and return a new View.
> I then use View.setId() to signify that this View is the loading row.
> Then when I attempt to re-use the convertView I check this ID to make
> sure I re-use the correct type of View. Is there a faster way?
> 
> Romain Guy mentioned that the Android Market app used OnScrollListener
> to detect when the last element was on screen. Why is this better than
> in the getView method checking if the position is the last one?

I haven't tried the OnScrollListener trick. My approach was to create a
wrapping adapter that handles this sort of "loading" behavior:

https://github.com/commonsguy/cwac-endless/tree

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

Android App Developer Books: http://commonsware.com/books.html

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

Reply via email to