×ボタンをタップした時に、ネイティブで確認ダイアログを表示するように修正した
Showing
| ... | ... | @@ -179,13 +179,14 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { |
| closeButton.setOnClickListener(new OnClickListener() { | ||
| @Override | ||
| public void onClick(View v) { | ||
| mButtonStatus = R.id.btn_close; // HTML側の分岐処理を行うため変数に値を渡す | ||
| //#41596 OZの報告入力フォームで☓をタップした際の動作がおかしい | ||
| finishActivity(); | ||
| doProcess(); // HTML側に閉じる処理を行う | ||
| // if (mProcessKey != null && mPhaseNo != 0) { //連続作業用のOZView画面非表示 | ||
| // finishActivity(); | ||
| // } | ||
| // リソースパターンの適用 | ||
| int messageResourceId = PatternStringUtil.patternToInt(getApplicationContext(), | ||
| R.string.msg_oz_report_cancel, | ||
| getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)); | ||
| showCancelConfirmAlert(PatternStringUtil.patternToInt(getApplicationContext(), | ||
| R.string.back, | ||
| getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),messageResourceId); | ||
| } | ||
| }); | ||
| ... | ... | @@ -650,6 +651,22 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { |
| 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) { | ||
| ABookAlertDialog logoutAkert = AlertDialogUtil.createAlertDialog(this, dialogTitle); | ||
| ... | ... | |