예제 #1
0
 @Override
 public void onPostExecute(Integer result) {
   if (result == RESULT_OK) {
     if (dashboardList.size() == 0) {
       dashboardActivity.setEmptyView(View.VISIBLE);
     } else {
       if (items.size() > 0) {
         dashboardActivity.setAdapter(items);
         dashboardActivity.setEmptyView(View.GONE);
       } else dashboardActivity.setEmptyView(View.VISIBLE);
     }
   } else if (result == RESULT_ERROR) {
     dashboardActivity.setEmptyView(View.VISIBLE);
     WarningDialog dialog =
         new WarningDialog(dashboardActivity, titleString, contentString, okString);
     dialog.show();
   } else if (result == RESULT_TIMEOUT) {
     new ConnTimeOutDialog(dashboardActivity, titleString, okString).show();
   }
   ExoUtils.setLoadingItem(loaderItem, false);
   String strGadgetsErrorList = dashboardController.getGadgetsErrorList();
   if (strGadgetsErrorList.length() > 0) {
     StringBuffer titleBuffer = new StringBuffer("Apps: ");
     titleBuffer.append(strGadgetsErrorList);
     titleBuffer.append(" ");
     titleBuffer.append(contentString);
     WarningDialog dialog =
         new WarningDialog(dashboardActivity, titleString, titleBuffer.toString(), okString);
     dialog.show();
   }
 }
예제 #2
0
 @Override
 public void onPreExecute() {
   ExoUtils.setLoadingItem(loaderItem, true);
 }
예제 #3
0
 @Override
 protected void onCancelled() {
   ExoUtils.setLoadingItem(loaderItem, false);
 }