Dismissing the Progress Dialog

Next, you implement the onPostExecute() method. Now that the background processing has taken place, you can just drop in the code you originally used to display the screen. This is also the perfect place to dismiss the progress dialog:

@Override protected void onPostExecute(Boolean result) { Log.d(DEBUG_TAG, "Download task complete."); if (result) {

displayCurrentQuestion(startingNumber); } else {

handleNoQuestions();

pleaseWaitDialog.dismiss();

For the full code to the implementation, please see the sample code provided on this book's website.

0 0

Post a comment