コード例 #1
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   if (resultCode == RESULT_OK) {
     findParameter = data.getStringExtra(Constants.DEVICE_CODE);
     input.setText(findParameter);
     currentPage = 1;
     store_add_goods_lv.setMode(Mode.PULL_FROM_START);
     getResult();
     store_add_goods_lv.setRefreshing();
   }
 }
コード例 #2
0
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (resultCode == RESULT_OK) {
      PayWayElement e =
          (PayWayElement) data.getSerializableExtra(PayWayShowOrCreateActivity.PAYWAY_DATA);
      if (CHANGE_PAYWAY == requestCode) {
        mAdapter.changeElement(e);
      } else if (CREATE_NEW_PAYWAY == requestCode) {
        mAdapter.addElement(e);
      }
    } else if (resultCode == PayWayShowOrCreateActivity.PAYWAY_DELETE) { // 仅在CHANGE_PAYWAY时发生
      PayWayElement e =
          (PayWayElement) data.getSerializableExtra(PayWayShowOrCreateActivity.PAYWAY_DATA);
      mAdapter.deleteElement(e.mPosition);
    }
  }