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