Thursday, June 16, 2011

[android-developers] Re: Dialog and Progress Dialog issues on Orientation Change

Hi,
Yes I'm sending the request to server in onCreateDialog(), but its an
AsyncTask.
In onPreExecute() show the progress dialog and onPostExecute() cancel
the progress dialog.

Off late I have another issue in computing textview height, I have
posted this issue on a separate thread also.
The issues is:
How to compute TextView Height before its laid out on screen?

I'm not aware how we can use getPaint().ascent() or descent()
method
for computing height?

Can you please provide an example

On Jun 6, 6:38 pm, Streets Of Boston <flyingdutc...@gmail.com> wrote:
> Are you sending a request to the server in the implementation of the
> 'onCreateDialog(...)' method? If so, this is not good. The onCreateDialog is
> called by the OS when the hosting activity is recreated due to a config
> change when a dialog is shown using the showDialog method (i.e. an
> activity-managed dialog). This is perfectly normal behavior.
>
> Call 'showDialog' just *after *you send an (asynchronous) request to the
> server and call 'dismissDialog' when the server returns a response. Usually,
> do not code anything in the onCreateDialog except for building an
> AlertDialog object.

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

No comments:

Post a Comment