Ya Mark is right !

You need to use *multithreading* for making a reponsive UI.

Thread.sleep inside spawned thread will give a chance to main UI thread to
response to User events.


---------- Forwarded message ----------
From: Alok Kulkarni <kulsu...@gmail.com>
Date: Tue, Jul 20, 2010 at 4:44 PM
Subject: [android-developers] cursor.moveToFirst() blocking UI
To: android-developers@googlegroups.com


Hi,
I have a background thread which queries for 1000 records at a time. After
querying , when i call cursor.moveToFirst(), the UI gets blocked until the
operation is completed.This is very disturbing experience for user ,
especially if there are 10000 plus records.I use Thread.sleep in between
after each 1000 records, As soon as cursor.moveToFirst is called, UI blocks
for 2 3 seconds.
Am i missing anything here ?

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



-- 
Thanks for Cooperating!
 Anil Kukreti

Network transforms ideas to reality.
09312646623
Linked In : http://in.linkedin.com/in/anilkukreti
Blog : http://androidosbeginning.blogspot.com/
Skype Id : anil.kleward

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

Reply via email to