22.05.2011 21:13, Gabriel Simões пишет:
My second approach was to find a way to block the displaying of some
entries creating a custom adapter but while I can change the
information I couldn´t find a way to not display full entries.
Ok, here is how you could do filtering on the fly.
Assume the data set you get from CP in a cursor is like this:
0 - mp3
1 - mp3
2 - no mp3
3 - mp3
4 - no mp3
Look through the cursor, checking for mp3s, and create a parallel index
array like this:
[ 0, 1, 3 ]
The array has the cursor positions where albums have mp3.
Now you have the count for the adapter's getCount method, which is the
length of this array. The positions as seen by the list view are 0
through 2.
In getView / bindView, use the table above to find out the position for
the original cursor: the 0th item is remapped to 0, 1 is mapped to 1,
but 2 is mapped to 3.
-- Kostya
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
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