0
因此,我有一個名爲ManagePayment的類,在此方法中,我需要將其更新爲以mm/yyyy格式顯示失效日期。有人可以幫我嗎我告訴我,我應該添加什麼?以mm/yyyy格式設置格式化失效日期
@Override
protected void onPostExecute(String result) {
if (MainActivity.getInstance().getProgressDialog() != null && MainActivity.getInstance().getProgressDialog().isShowing())
MainActivity.getInstance().getProgressDialog().dismiss();
if (AppConstants.ERROR401.equalsIgnoreCase("401")) {
new AppConstants.logoutAccount().execute();
} else {
if (result != null && !result.equals("")) {
Log.i("elang", "elang result: " + result);
try {
JSONObject resObject = new JSONObject(result);
String sucess = resObject.getString("status");
if (sucess.equalsIgnoreCase("true")) {
JSONObject responseObject = resObject.getJSONObject("response");
JSONArray jsonArray = responseObject.getJSONArray("Payments");
mCardNumber = jsonArray.getJSONObject(0).getString("MaskedAccountNumber");
mExpirationDate = jsonArray.getJSONObject(0).getString("ExpirationDate");
MainActivity.getInstance().getFragmentManager().popBackStack();
MainActivity.getInstance().displayView(AppConstants.CARDSUMMARY);
} else
managePaymentForm.setVisibility(View.VISIBLE);
} catch (Exception e) {
e.printStackTrace();
AppConstants.showMsgDialog("", e.getMessage(), MainActivity.getInstance());
}
}
}
}