@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(); } }
private void changeLanguage() { Resources resource = dashboardActivity.getResources(); okString = resource.getString(R.string.OK); titleString = resource.getString(R.string.Warning); contentString = resource.getString(R.string.GadgetsCannotBeRetrieved); }