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. video playing in appwidget.

is it possible to play a video in an appwidget?

-- 

2. What should be the image resolution for Nexus One or Droid?

Hi,

As Android supports multiple devices from different manufacturers
there are different screen resolutions supported.

The table that is available at
http://developer.android.com/intl/fr/guide/practices/screens_support.html#screen-independence
is not very clear to me.

It shows WVGA and FWVGA in MDPI for Large Screens and HDPI for Normal
screens. So, if the image is kept in drawable-mdpi and its resolution
is 320 * 480 then which image will be taken by Large Screens device of
MDPI.

Moreover, there are two screen resolutions for HDPI i.e. 480 * 800 and
480 * 854. So, with what screen resolution the image should be built.

I want to place the background image which looks distorted in WVGA
emulator since its resolution is 320 * 480.

I have read about nine patchable images but I think they are better
for button images and edittext images so that they can stretch
according to the data in it.

Can someone please guide me in this?


Regards
Sunil

-- 

3. how an activity transfers the value from one activity

4. Nexus One clone spotted running iPhoney OS

5. secure erase data partitio

6. Video is not rendering

7. How to let soft keyboard overlap the footer of window