Saturday, May 21, 2011

[android-developers] Filter specific data from cursor before ListView. How?

Hello,

I´ve been searching on the web and here for information but couldn´t
find anything related to this problem so I hope you can help me.
I´m retrieving information from 2 diferent content providers that are
related. Information from one content provider (songs list) should
define the rules to filter another group of info (albums).

I´m trying to create an expandablelistview where only the albums which
have mp3 files would be listed as headers, and the mp3 songs would be
in the second level list.

At first I tried to figure out a way of implementing ContentProvider
searches that would allow me to recover only the required data but I
couldn´t find a way to do it (use group by, relate both
contentproviders in the same query, ...). Then I tried to retrieve the
info and filter programatically but the Cursor class doesn't have
methods to remove or filter information.

After I tried to figure out a way to implement the rule in a
CursorAdapter but while I can customize the information handling, I
couln´t find a way of blocking some retrieved Cursor "lines" so I
could display only albums with at least one mp3 file.

Please, throw some light in here. How can I archive this result?

Thanks,
Gabriel Simões

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate