Commit fe870d7b by Lee Jaebin

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

parent c9b298e1
......@@ -664,24 +664,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override
public void onClick(View v) {
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
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();
showConfirmSavePanoEdit();
} else {
// 作業終了する時、作業ID設定して作業一覧で使用するメソットを行う。
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId);
......@@ -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で使用
protected void finishActivity() {}
protected void webViewLoadUrl(String url){}
......
......@@ -246,7 +246,10 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (mXWalkOpenType != Constant.XWalkOpenType.PANO_EDIT && mOperationId != null && mOperationId > -1) {
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
showConfirmSavePanoEdit();
} else {
if (mOperationId != null && mOperationId > -1) {
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId);
}
if (isLinkedContent) {
......@@ -254,6 +257,7 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
} else {
finishActivity();
}
}
} else {
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