On Jul 31, 12:07 am, Mark Murphy <mmur...@commonsware.com> wrote:
> skink wrote:
> > i'd like to use CursorAdapter but Cursor its based on cannot be
> > returned by simple sql query, since in db i have two fields and based
> > on some criteria they build the String that would be displayed in the
> > ListView.
>
> > what is the best solution: forget CursorAdapter and use ArrayAdapter
> > or MatrixAdapter iterating over my db Cursor and adding rows, or maybe
> > use CursorWrapper or some ither solution?
>
> That depends on what you are doing with the Cursor.
>
> If the Cursor is just going to go into a CursorAdapter, I would do the
> build-the-String-out-of-the-fields stuff in the CursorAdapter.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Warescription: Three Android Books, Plus Updates, $35/Year


thanks Mark,

already found the best solution for me: ResourceCursorAdapter +
overriding bindView().

also i had some problems as my db doesn't have field _id which is
required by CursorAdapter until i found out that i can 'select idx as
_id' - but i'm not 100% sure if it is not kinda hack

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