Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Several problems with your code:</p> <ol> <li>I guess your code fails - You requesting dialog show but have no OnCreateDialog which returns dialog to show, so You getting :</li> </ol> <p>08-16 16:26:52.748: E/AndroidRuntime(905): Caused by: java.lang.NullPointerException 08-16 16:26:52.748: E/AndroidRuntime(905): at android.app.Dialog.(Dialog.java:141) ).</p> <p>You need to to override onCreateDialog() in your Activity class</p> <pre><code>@Override protected Dialog onCreateDialog(int id) { ProgressDialog progress; progress = new ProgressDialog(this); progress.setMessage("Loading data, please wait"); return progress; } </code></pre> <ol start="2"> <li><p>To start showing dialog, use this code in ProgressTask.preExecute(): </p> <p>{ int taskId=1; //just example</p> <p>showDialog(taskId); }</p></li> <li><p>To dismiss dialog - use dismissDialog(taskId) in ProgressTask.postExecute();</p></li> <li><p>HTTP connection in main stream will cause exception. You have to use ProgressTask.doInBackground() to perform http connections.</p></li> <li><p>You should not modify UI elements from .doInBackground. Modify listAdapter of Activity and other UI elements in .preExecute() and/or .postExecute() of AsyncTask. It's covered in Google tutorial for AsyncTask usage.</p></li> </ol> <p>Complete code example covering all the mentioned issues I've provided here: <a href="https://stackoverflow.com/questions/4081317/android-synctask-not-showing-the-list-after-progressdialog/13862657#13862657">Android, synctask not showing the list after progressDialog</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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