I found this tutorial

http://www.helloandroid.com/tutorials/using-threads-and-progressdialog

What you can try to do and see if it works is to create a new thread
on button click so that when the page is loading, you can display an
indeterminate progress dialog while you are waiting on the page to be
done loading using Webview's getProgress() method
http://developer.android.com/intl/fr/reference/android/webkit/WebView.html#getProgress()
.

Create a handler so that when the page is done loading, you can
dismiss the dialog.
Hope that helps you(see the tutorial).


On Mon, Feb 1, 2010 at 11:41 AM, Achanta <[email protected]> wrote:
> Thank you for the reply,
>
>> as I'm sure this question has been asked before.
> 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.
>
>> From what I gather, you'll have to start a thread using AsyncTask and
>> that way you can show your progress dialog.
> 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.
>
>
> On Feb 1, 11:12 am, Temitope Akinwande <[email protected]> wrote:
>> Hi,
>>
>> You can check this 
>> outhttp://developer.android.com/intl/fr/guide/topics/ui/dialogs.html#Pro...http://developer.android.com/intl/fr/reference/android/os/AsyncTask.html
>>
>> From what I gather, you'll have to start a thread using AsyncTask and
>> 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
>>
>> On Mon, Feb 1, 2010 at 10:39 AM, Achanta <[email protected]> wrote:
>> > 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.
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to [email protected]
>> > To unsubscribe from this group, send email to
>> > [email protected]
>> > For more options, visit this group at
>> >http://groups.google.com/group/android-developers?hl=en
>>
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to