Filter rows from Cursor so they don't show up in ListView

Posted by Richard on Stack Overflow See other posts from Stack Overflow or by Richard
Published on 2010-06-12T04:00:52Z Indexed on 2010/06/12 4:02 UTC
Read the original article Hit count: 239

Filed under:

I have a Cursor that returns rows I use with a SimpleCursorAdapter to populate a ListView. I would like to filter some of the rows so they don't get displayed in my ListView. I use the data from the rows elsewhere in my Activity so I don't want to change my SQL to filter them with a WHERE clause.

What is the best way to keep a row from being displaying in my ListView? Ideally I would check a column in my row and then only add rows to the ListView that satisfy a condition.

© Stack Overflow or respective owner

Related posts about android