FilterQueryProvider, filter and ListView
<p>I have a database as follows:</p>

<pre><code>------------------------------
BOOK NAME | BOOK FORMAT | COUNT |
------------------------------
Android   | HTML       | 1
WPF       | PDF        | 10
Symbian   | PS         | 2
Windows   | HTML       | 2
</code></pre>

<p>I am showing this database to the user
by making use of a CustomSimpleCursorAdapter.</p>

<p>CustomSimpleCursorAdapter extends SimpleCursorAdapter
implements Filterable</p>

<p>with getView() &amp; runQueryonBackgroundThread() being overriden. 
The Grid view of books is properly shown.</p>

<p>The user has the following options:</p>

<p>HTML | PDF | PS | DELETE </p>

<pre><code>Constraint: BOOK FORMAT
[HTML - 1, PDF - 2, PS - 3] 
</code></pre>

<p>When the user presses HTML menu option, the books with HTML
type has to be shown.</p>

<p>inside MenuOption handler(), I wrote as follows:</p>

<pre><code>adapter.getFilter().filter("1");

runQueryonBackgroundThread(){
if(mCursor != null)
mCursor.close();
mCursor = query(using the constraint)
return mCursor;
}
</code></pre>

<p>This constraint reaching my overriden runQueryonBackgroundThread()
method. But its not updating the grid view and throws an exception.</p>

<p>"FILTER: android.view.ViewRoot$CalledFromWrongThreadException: Only the
original thread that created a view hierarchy can touch its views"</p>

<p>Please help me.</p>

<p>Thank you,</p>

<p>Ram</p>
