Moto wrote:
> I been using custom adapters based on the BaseAdapter and I usually
> populate my data at the getView() funtion.
> 
> Now I'm trying to write my custom adapter for my database cursor which
> now will be based on a CursorAdapter.
> 
> I'm getting confused where I should do the populating work...??  Along
> with how do I implement my inflating and populating "smart/efficient
> code based on RomainGuy presentation..." ??

Override newView(), and in there inflate new rows. That will only be
called when there is no existing row to recycle.

Also override bindView(), and in there pour your Cursor's data into the
supplied row.

I usually implement this such that newView() inflates the row, then
calls bindView(), so all my data-binding logic can be in one place.

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

Looking for Android opportunties? http://wiki.andmob.org/hado

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