I've written my own FilteredCursor that filters rows away from one cursor, by "joining" it with another (uses CursorJoiner internally). It suits my needs and is not quite general. The sort ASC presumption is a big downside. It's in the source code for my Collectionista project (revision 48, net.lp.collectionista.techserv.providers.FilteredCursor): http://bazaar.launchpad.net/%7Epjv/collectionista/trunk/download/48/filteredcursor.java-20081215002110-blupm1dk5m7h1z4a-2/FilteredCursor.java?file_id=filteredcursor.java-20081215002110-blupm1dk5m7h1z4a-2
It doesn't yet fully work though. Some issues I am encountering/have encountered: - The behaviour of CursorWrapper is not as documented (http:// code.google.com/p/android/issues/detail?id=1538). - Several of the classes offered aren't general at all, but very restricted, which is a bit of a disappointment: CursorWrapper, CursorJoiner, and the whole Cursor/CursorFactory infrastructure in general. The fact that it's not easy to create a new Cursor or to duplicate one. - I'm currently struggling with some random behaviour in my FilteredCursor, which I think could be related to concurrency. The ListAdapters in my UI that use the FilteredCursor seem to fail to get any information out of it sometimes. I did think about requery() etc. I'm a bit out of my wits on how to make all this work exactly as a regular cursor (for concurrency etc.) and it isn't documented perfectly either. Thanks anyway for considering, Mark, and I'm sure you'll be able to provide us with a more general example in your book soon. On 14 dec, 17:29, Mark Murphy <[email protected]> wrote: > pjv wrote: > > Would you please share your custom solutions (in code) for reuse? > > Alas, my implementation was made under contract for another firm, so I > cannot release it at this time. > > I'll see about rewriting it at some point, perhaps as part of a chapter > in my upcoming Advanced Android book. I can't guarantee a timetable, though. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 1.9 Published! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

