Thanks for all replies, it really helps. It helps me to dig deep into
handler... Till now i thought, handler will create in a seperate
thread.. Thanks Lance for providng the link and of course Mark murphy,
always there to help us(Android Developers)..

Nithin

On Mar 17, 6:57 pm, Lance Nanek <lna...@gmail.com> wrote:
> When created by the no argument constructor, aHandlerruns on thethreadit is 
> created on. You often see aHandlercreated on the mainthreadintentionally, 
> like in Mark's example above, so that a secondthreadcan send messages to it 
> that will be acted on in the mainthread. This is needed because the Android 
> UI Toolkit isn'tthread
> safe; it needs to be called from the mainthread. TheHandlerin that
> case is just used for UI updates, not for the work that should be done
> in the otherthread.
>
> You can use aHandlerfor doing work in anotherthread, however.
> There's an example of that in the documentation 
> here:http://developer.android.com/intl/de/reference/android/os/Looper.html
>
> There are also some alternatives to that example explored 
> here:http://stackoverflow.com/questions/2187464/how-do-i-ensure-another-th...
>
> On Mar 17, 6:03 am, Nithin <nithin.war...@gmail.com> wrote:
>
> > Hi,
>
> > For showing loading screen, in the activity's mainthread, I draw
> > loading screen and created ahandlerfor doing other extensive
> > operations like database creations, parsing etc.
>
> > But unfortunate;y, for me, all is executing in mainthreadonly. Seems
> > likeHandleris not working as a seperateThread. Any idea please..
>
> > Nithin

-- 
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