How to show a loading image or an animation?

by Achanta » Tue, 02 Feb 2010 01:39:54 GMT


Sponsored Links
 I have a search box and a web view in my activity.

I also have a search button which when someone clicks opens a the url
in the webview below the search box.

Everything is working fine except that it remains blank while the page
loads.
I want to show a loading message with a spinning icon/animation while
the page loads. [similar to one in the market app].

please let me know how to do it.
Thank you.

--



How to show a loading image or an animation?

by Temitope Akinwande » Tue, 02 Feb 2010 02:13:27 GMT


 Hi,

You can check this out
 http://developer.android.com/intl/fr/guide/topics/ui/dialogs.html #ProgressDialog
 http://developer.android.com/intl/fr/reference/android/os/AsyncTask.html 

that way you can show your progress dialog.
A search of progress dialog and async task should yield more results
as I'm sure this question has been asked before.

-Tope



>


Sponsored Links


How to show a loading image or an animation?

by Achanta » Tue, 02 Feb 2010 02:41:48 GMT


 Thank you for the reply,

I was also sure that it has been asked before because its a common
task, But searching the web or this group did not give me the
appropriate results.

I may have to but I am not sure. Here I am loading a webpage and this
is happening in the same thread or it appears to be. I can also get
the progress of it from the WebView. I am not doing any background
activity like calculations or downloading stuff, but loading the page
which is on the same thread. So I am a little lost on how to get this
done.

Thanks again.





> >



How to show a loading image or an animation?

by Achanta » Tue, 02 Feb 2010 04:05:32 GMT


 I saw that tutorial earlier and have also tried it.

Yes for now even a progress dialog in that way works for me.
I know i need to use getProgress but do not know how to send the
progress to the thread running the progress dialog.

Thanks again.






> >> >



How to show a loading image or an animation?

by Achanta » Fri, 05 Feb 2010 01:26:41 GMT


 ey Tope,

thank you for posting it.

I could not work on this till now but will start using your code. I
hope it will do what I need.
Thanks again for atleast getting me started on this thing.

Achie.

On Feb 1, 4:35pm, Temitope Akinwande <takinwa...@gmail.com> wrote:
> >> >> >



Other Threads

1. Does Android provide Apps or Activities for viewing Certificates?

Does Android provide any reusable components for handling
Certificates? For example if I create a X509Certificate from DER
encoded data, are there reusable views for displaying the Common Name,
Expiration date, etc...?

-- 

2. Dynamically java class on android/dalvik?

I use DexClassLoader load my update class files is finish.I run update class
method print old method value don't update class method value.why?

-- 
Cary

-- 

3. Drawable.mutate().setAlpha() not working pre 2.2?

4. Camera Issues on Samsung Galaxy S

5. Why Android cannot play .avi but can play youtube (avi?) and flash?

6. Image Viewer Problem

7. Network Failure error when trying to use maps from Eclipse