×ボタンをタップした時に、ネイティブで確認ダイアログを表示するように修正した
Showing
| ... | @@ -179,13 +179,14 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { | ... | @@ -179,13 +179,14 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { |
| closeButton.setOnClickListener(new OnClickListener() { | closeButton.setOnClickListener(new OnClickListener() { | ||
| @Override | @Override | ||
| public void onClick(View v) { | public void onClick(View v) { | ||
| mButtonStatus = R.id.btn_close; // HTML側の分岐処理を行うため変数に値を渡す | // リソースパターンの適用 | ||
| //#41596 OZの報告入力フォームで☓をタップした際の動作がおかしい | int messageResourceId = PatternStringUtil.patternToInt(getApplicationContext(), | ||
| finishActivity(); | R.string.msg_oz_report_cancel, | ||
| doProcess(); // HTML側に閉じる処理を行う | getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)); | ||
| // if (mProcessKey != null && mPhaseNo != 0) { //連続作業用のOZView画面非表示 | |||
| // finishActivity(); | showCancelConfirmAlert(PatternStringUtil.patternToInt(getApplicationContext(), | ||
| // } | R.string.back, | ||
| getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),messageResourceId); | |||
| } | } | ||
| }); | }); | ||
| ... | @@ -650,6 +651,22 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { | ... | @@ -650,6 +651,22 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { |
| return true; | return true; | ||
| } | } | ||
| // 左上の×ボタンを押したときの処理 | |||
| private void showCancelConfirmAlert(final int dialogTitle, int dialogMessage) { | |||
Please
register
or
sign in
to reply
|
|||
| ABookAlertDialog logoutAkert = AlertDialogUtil.createAlertDialog(this, dialogTitle); | |||
|
|||
| logoutAkert.setMessage(dialogMessage); | |||
| logoutAkert.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.confirm), new DialogInterface.OnClickListener() { | |||
| @Override | |||
| public void onClick(DialogInterface dialog, int which) { | |||
| mButtonStatus = R.id.btn_close; | |||
| finishActivity(); | |||
| doProcess(); // HTML側に閉じる処理を行う | |||
| } | |||
| }); | |||
| logoutAkert.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), (DialogInterface.OnClickListener) null); | |||
| showAlertDialog(logoutAkert); | |||
| } | |||
| // アラート表示処理 | // アラート表示処理 | ||
| private void showSaveConfirmAlert(final int dialogTitle, int dialogMessage) { | private void showSaveConfirmAlert(final int dialogTitle, int dialogMessage) { | ||
| ABookAlertDialog logoutAkert = AlertDialogUtil.createAlertDialog(this, dialogTitle); | ABookAlertDialog logoutAkert = AlertDialogUtil.createAlertDialog(this, dialogTitle); | ||
| ... | ... |