Commit fe870d7b by Lee Jaebin

360編集画面で端末の戻るボタンを修正

parent c9b298e1
...@@ -664,24 +664,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -664,24 +664,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) { if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ABVContentViewActivity.this, PatternStringUtil.patternToInt(getApplicationContext(), showConfirmSavePanoEdit();
R.string.pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
// リソースパターンの適用
alertDialog.setMessage(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_confirm_save_pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setNegativeButton(R.string.cancel, null);
alertDialog.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
callUnloadAuth();
dialog.dismiss();
finish();
}
});
alertDialog.show();
} else { } else {
// 作業終了する時、作業ID設定して作業一覧で使用するメソットを行う。 // 作業終了する時、作業ID設定して作業一覧で使用するメソットを行う。
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId); putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId);
...@@ -754,6 +737,30 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -754,6 +737,30 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}); });
} }
/**
* 編集を終了しますかのダイアログメッセージ表示
*/
public void showConfirmSavePanoEdit() {
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(ABVContentViewActivity.this, PatternStringUtil.patternToInt(getApplicationContext(),
R.string.pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
// リソースパターンの適用
alertDialog.setMessage(PatternStringUtil.patternToString(getApplicationContext(),
R.string.msg_confirm_save_pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)));
alertDialog.setNegativeButton(R.string.cancel, null);
alertDialog.setPositiveButton(R.string.ok,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
callUnloadAuth();
dialog.dismiss();
finish();
}
});
alertDialog.show();
}
//以下のメッソドは子ActivityにOverideで使用 //以下のメッソドは子ActivityにOverideで使用
protected void finishActivity() {} protected void finishActivity() {}
protected void webViewLoadUrl(String url){} protected void webViewLoadUrl(String url){}
......
...@@ -246,13 +246,17 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -246,13 +246,17 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
@Override @Override
public boolean onKeyUp(int keyCode, KeyEvent event) { public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { if (keyCode == KeyEvent.KEYCODE_BACK) {
if (mXWalkOpenType != Constant.XWalkOpenType.PANO_EDIT && mOperationId != null && mOperationId > -1) { if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId); showConfirmSavePanoEdit();
}
if (isLinkedContent) {
goToBack();
} else { } else {
finishActivity(); if (mOperationId != null && mOperationId > -1) {
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId);
}
if (isLinkedContent) {
goToBack();
} else {
finishActivity();
}
} }
} else { } else {
return super.onKeyUp(keyCode, event); return super.onKeyUp(keyCode, event);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment