ダイアログの表示にshowAlertDialogを使用するように変更。gradle.propertiesを元にもどした。
Showing
| package jp.agentec.abook.abv.ui.viewer.activity; | package jp.agentec.abook.abv.ui.viewer.activity; | ||
| import android.app.AlertDialog; | |||
| import android.content.Context; | import android.content.Context; | ||
| import android.content.DialogInterface; | import android.content.DialogInterface; | ||
| import android.content.Intent; | import android.content.Intent; | ||
| ... | @@ -180,13 +181,14 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { | ... | @@ -180,13 +181,14 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { |
| @Override | @Override | ||
| public void onClick(View v) { | public void onClick(View v) { | ||
| // リソースパターンの適用 | // リソースパターンの適用 | ||
| int messageResourceId = PatternStringUtil.patternToInt(getApplicationContext(), | // int messageResourceId = PatternStringUtil.patternToInt(getApplicationContext(), | ||
| R.string.msg_oz_report_cancel, | // R.string.msg_oz_report_cancel, | ||
| getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)); | // getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)); | ||
| showCancelConfirmAlert(PatternStringUtil.patternToInt(getApplicationContext(), | // showCancelConfirmAlert(PatternStringUtil.patternToInt(getApplicationContext(), | ||
| R.string.back, | // R.string.back, | ||
| getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),messageResourceId); | // getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),messageResourceId); | ||
| showCancelConfirmAlert(); | |||
Please
register
or
sign in
to reply
|
|||
| } | } | ||
| }); | }); | ||
| ... | @@ -651,11 +653,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { | ... | @@ -651,11 +653,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { |
| return true; | return true; | ||
| } | } | ||
| // 左上の×ボタンを押したときの処理 | /** | ||
| private void showCancelConfirmAlert(final int dialogTitle, int dialogMessage) { | * 左上の×ボタンを押したときの処理(ダイアログを表示する) | ||
| ABookAlertDialog logoutAkert = AlertDialogUtil.createAlertDialog(this, dialogTitle); | */ | ||
| logoutAkert.setMessage(dialogMessage); | private void showCancelConfirmAlert() { | ||
| logoutAkert.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.confirm), new DialogInterface.OnClickListener() { | AlertDialogUtil.showAlertDialog(this, getString(R.string.confirm), getString(R.string.msg_oz_report_cancel), false, new DialogInterface.OnClickListener() { | ||
| @Override | @Override | ||
| public void onClick(DialogInterface dialog, int which) { | public void onClick(DialogInterface dialog, int which) { | ||
| mButtonStatus = R.id.btn_close; | mButtonStatus = R.id.btn_close; | ||
| ... | @@ -663,8 +665,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { | ... | @@ -663,8 +665,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { |
| doProcess(); // HTML側に閉じる処理を行う | doProcess(); // HTML側に閉じる処理を行う | ||
| } | } | ||
| }); | }); | ||
| logoutAkert.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), (DialogInterface.OnClickListener) null); | |||
| showAlertDialog(logoutAkert); | |||
| } | } | ||
| // アラート表示処理 | // アラート表示処理 | ||
| ... | ... |