Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Pause Before Loading Page
    text
    copied!<p>I have two Activities. Activity A gets a large amount of information from the web that activity B will use. Activity A uses a ProgressDialog to download the information and then fires the intent to start Activity B. This works fine, but after the ProgressDialog disappears there is about a 1-3 second pause before Activity B begins. Activity B uses the downloaded information to display a large ListView.</p> <p>Is there anyway to prevent this pause after my ProgressDialog is done displaying? </p> <p>Code for triggered event on Activity A</p> <pre><code> progressdialog = ProgressDialog.show(this, "", "Loading..."); mAsyncFacebookRunner.request("fql", paramaters, new FQLRequestListener()); </code></pre> <p>Code for the Facebook RequestListener</p> <pre><code> private class FQLRequestListener implements RequestListener { @Override public void onComplete(String response, Object state) { try { // Load Lots of Data Here ... Intent Invite = new Intent(ActivityA.this, ActivityB.class); Bundle bundle = new Bundle(); bundle.putSerializable("items", items); Invite.putExtras(bundle); progressdialog.dismiss(); startActivityForResult(Invite, INVITE_FRIENDS); } catch (JSONException e) { } catch (FacebookError e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Override public void onIOException(IOException e, Object state) { // TODO Auto-generated method stub Log.d("exception", "IOException"); } @Override public void onFileNotFoundException(FileNotFoundException e, Object state) { // TODO Auto-generated method stub Log.d("exception", "FNFException"); } @Override public void onMalformedURLException(MalformedURLException e, Object state) { // TODO Auto-generated method stub Log.d("exception", "MalformedURLException"); } @Override public void onFacebookError(FacebookError e, Object state) { // TODO Auto-generated method stub Log.d("exception", "FacebookError"); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload