Android handling queries that take time in CursorAdapter getView()
<pre><code>public View getView(int position, View convertView, ViewGroup parent) {
...
        boolean flag = db.isRegistered(contactId_text);

        ImageView iv = (ImageView) vi.findViewById(R.id.typeImage);
        if (flag) {

            holder.image1.setImageResource(R.drawable.registered);
        }
...
}
</code></pre>

<p>The above is my code block in the getView(). The db.isRegistered(contactId_text) method is a query that takes some time to get a result, so it lags my listview scrolling screen, what's a good way to handle this? I tried AsyncTask, but when the list gets too long, u get the AsyncTask limit error(Forgot the exception name).</p>
