On Dec 14, 4:23 pm, pjv <ezelsping...@gmail.com> wrote: > Would you please share your custom solutions (in code) for reuse?
Sure - take a look at jarkman.co.uk/code/ JoiningAndFilteringCursors.zip There are two CursorWrapper derived classes in there, FilteringCursor and JoiningCursor. FilteringCursor leaves out rows, and JoiningCursor adds colums. Then there are two subclasses of JoiningCursor, one which uses a SQL filter to identify the extra data to add (JoiningCursorFilter - sorry for the bemusing name), and one which uses a URI-appending method (JoiningCursorUri). It would be easy to make more specific subclasses which got the extra data from some other source of your own, not from a cursor. And there are two example filters to use with FilteringCursor, CursorFilterGotAValue and CursorFilterInt. Again, it should be easy to write more specific filters for your own needs. FilteringCursor can be a performance problem, because it needs to do all its filtering before it can return from getCount(). I can't see any way to get round that. If you can, please let me know! :-) Thanks, Richard --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---