Beispiel #1
1
  private void jumpToCancel() {
    if (myActivity != null && !myActivity.isFinishing()) {
      try {
        AlipayApplication application = (AlipayApplication) myActivity.getApplication();
        application
            .getDataHelper()
            .showDialog(
                myActivity,
                0,
                "",
                myActivity.getResources().getString(R.string.CancelDownload),
                myActivity.getResources().getString(R.string.Yes),
                new DialogInterface.OnClickListener() {
                  @Override
                  public void onClick(DialogInterface dialog, int which) {
                    // TODO Auto-generated method stub
                    mCanceled = true;
                    endProcess();
                  }
                },
                myActivity.getResources().getString(R.string.No),
                new DialogInterface.OnClickListener() {
                  @Override
                  public void onClick(DialogInterface dialog, int which) {
                    // TODO Auto-generated method stub
                  }
                },
                null,
                null);
      } catch (Exception e) {

      }
    }
  }
Beispiel #2
0
  void showErrorMessage(int strId) {
    if (myActivity != null && !myActivity.isFinishing()) {
      AlipayApplication application = (AlipayApplication) myActivity.getApplication();
      application
          .getDataHelper()
          .showDialog(
              myActivity,
              0,
              myActivity.getResources().getString(R.string.ErrorString),
              myActivity.getResources().getString(strId),
              myActivity.getResources().getString(R.string.Ensure),
              new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                  // TODO Auto-generated method stub
                }
              },
              null,
              null,
              null,
              null);
      /* StyleAlertDialog dialog = new StyleAlertDialog(myActivity, 0,
          		myActivity.getResources().getString(R.string.ErrorString),
          		myActivity.getResources().getString(strId),
          		myActivity.getResources().getString(R.string.Ensure),new DialogInterface.OnClickListener() {
      	@Override public void onClick(DialogInterface dialog,
      			int which)
      	{
      		// TODO Auto-generated method stub
      	}
      },
          		null,null, null);
              dialog.show();*/

      //		AlertDialog.Builder tDialog = new AlertDialog.Builder(myActivity);
      //		// tDialog.setIcon(R.drawable.quit_bg);
      //		tDialog.setTitle(myActivity.getResources().getString(
      //				R.string.ErrorString));
      //		tDialog.setMessage(myActivity.getResources().getString(strId));
      //		tDialog.setPositiveButton(R.string.Ensure,
      //				new DialogInterface.OnClickListener() {
      //					@Override public void onClick(DialogInterface dialog,
      //							int which)
      //					{
      //						// TODO Auto-generated method stub
      //					}
      //				});
      //		tDialog.show();
    }
  }
 @Override
 protected void onResume() {
   super.onResume();
   JSONArray cardList = getSavedCardList();
   if (cardList == null || application.isBankListRefresh()) {
     getCardList();
   }
 }
 @Override
 protected void onPostExecute(String bizType, Object result) {
   if (bizType.equalsIgnoreCase(GetCardList.BIZ_TAG)) {
     JSONObject response = JsonConvert.convertString2Json((String) result);
     if (!CommonRespHandler.processSpecStatu(getRootController(), response)) {
       return;
     }
     if (CommonRespHandler.filterBizResponse(getRootController(), response)) {
       application.setBankListRefresh(false);
       processGetListCardResponse(response);
     }
   }
   super.onPostExecute(bizType, result);
 }
 /** 加载缓存的卡列表数据 */
 private void loadCacheCardList() {
   JSONArray cardList = getSavedCardList();
   if (cardList != null && !application.isBankListRefresh()) {
     loadCardList(cardList);
   }
 }