Commit 49ba3b58 by Lee Jaebin

changeTaskReportコマンド追加処理

多言語パータン修正
PDFタイプで回転時、フォームが全画面でも表示するように修正
PDFの拡大を3倍から5倍に変更
parent de69c73f
......@@ -114,6 +114,7 @@ public class ABookKeys {
public static final String LOCAL_SAVE = "localSave"; // 一時保存情報
public static final String ADD_REPORT = "addReport"; // 作業追加区分
public static final String CMD_LOCAL_SAVE_TASK_REPORT = "localSaveTaskReport"; // 一時保存
public static final String CMD_CHANGE_TASK_REPORT = "changeTaskReport"; // 報告・報告(回答)切替
// #32926 作業報告画面改善 start
public static final String HAS_AUTHORITY = "hasAuthority";
// #32926 作業報告画面改善 end
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -889,7 +889,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_MOVE_HOT_SPOT, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT,
ABookKeys.CMD_DELETE_TASK_REPORT, ABookKeys.CMD_CANCEL_TASK_REPORT, ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT)) {
ABookKeys.CMD_DELETE_TASK_REPORT, ABookKeys.CMD_CANCEL_TASK_REPORT, ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT, ABookKeys.CMD_CHANGE_TASK_REPORT)) {
try {
if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT)) {
......@@ -938,6 +938,11 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public Object callback(Object ret) {
final boolean isError = (boolean)ret;
closeProgressPopup();
// 報告・報告(回答)の切り替えボタンタップ
if (mCmd.equals(ABookKeys.CMD_CHANGE_TASK_REPORT)) {
afterABookCheckApi(mCmd, mTaskKey, 0, "", null, isOperationPdf());
return null;
}
if (ActivityHandlingHelper.getInstance().searchOzdActivityStack()) { // OZD作業画面があるかを確認
// PDF且つ、一時保存の場合は、以下の処理を行わないでreturn null;で処理を終わらせる
......
......@@ -4,7 +4,7 @@ public interface IFPDFConst {
float ASPECT_4_3_LAND = 1024f / 748f; // 4:3のアスペクト比(縦)
float ASPECT_4_3_PORT = 1004f / 768f; // 4:3のアスペクト比(横)
float MAX_SCALE = 3.0f;
float MAX_SCALE = 5.0f;
float MIN_SCALE = 0.8f;
float NEXT_SCALE = MAX_SCALE / 3;
}
......@@ -132,6 +132,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
mOperationLogic.createHopSpotJson(operationId, contentPath);
break;
case ABookKeys.CMD_CANCEL_TASK_REPORT:
case ABookKeys.CMD_CHANGE_TASK_REPORT: // 報告・報告(回答)の切り替え コールバック時は、何もしない
FileUtil.delete(ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey));
mFinishCallback.callback(false);
break;
......
......@@ -125,6 +125,7 @@ import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey;
import jp.agentec.abook.abv.ui.common.appinfo.options.Options;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.constant.IFPDFConst;
import jp.agentec.abook.abv.ui.common.dialog.ABookAlertDialog;
import jp.agentec.abook.abv.ui.common.helper.ABVViewUnbindHelper;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
......@@ -5138,7 +5139,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
btnScaleZoomPlus.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
setScaleZoomInOut(1);
setScaleZoomInOut(true);
}
});
btnScaleZoomPlus.setVisibility(View.VISIBLE);
......@@ -5156,7 +5157,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
btnScaleZoomMinus.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
setScaleZoomInOut(-1);
setScaleZoomInOut(false);
}
});
btnScaleZoomMinus.setVisibility(View.VISIBLE);
......@@ -5174,19 +5175,6 @@ public class ContentViewActivity extends ABVContentViewActivity {
List<OperationTaskDto> tasks = mTaskHotspotJSON.getPageTasks(pageNumber);
operationTaskLayout.addAllOperationTaskIcon(rootLayout, tasks);
//画面回転の時
if (configChangedFlg && !isNormalSize()) {
operationTaskLayout.currentLayout = rootLayout;
RelativeLayout.LayoutParams params;
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
int screenWidth = displayMetrics.widthPixels;
params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
params.addRule(operationTaskLayout.getAlignOfTaskLayer());
operationTaskLayout.setTaskCodeBlinkAnimation();
operationTaskLayout.setLayoutParams(params);
setOperationTaskViewStatus(isOpenedOperationTask);
}
}
public void setCurrentOperationTask(OperationTaskDto operationTaskDto) {
......@@ -5361,15 +5349,21 @@ public class ContentViewActivity extends ABVContentViewActivity {
return mOperationId;
}
public void setScaleZoomInOut(int zoom) {
public void setScaleZoomInOut(boolean zoomInFlg) {
ZoomRelativeLayout zoomLayout = mShowPageLayout.get(mCurrentPageNumber);
float scaleFactor = zoomLayout.getScaleFactor();
scaleFactor += zoom;
if (scaleFactor < 1) {
scaleFactor = 1;
} else if (scaleFactor > 3) {
scaleFactor = 3;
if (zoomInFlg) {
if (scaleFactor <= 1.0f) {
scaleFactor = 2.5f;
} else if (scaleFactor > 1.0f && scaleFactor <= 2.5f) {
scaleFactor = IFPDFConst.MAX_SCALE;
}
} else {
if (scaleFactor > 2.5f && scaleFactor <= IFPDFConst.MAX_SCALE) {
scaleFactor = 2.5f;
} else if (scaleFactor > 1.0f && scaleFactor <= 2.5f) {
scaleFactor = 1.0f;
}
}
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
......@@ -5389,13 +5383,13 @@ public class ContentViewActivity extends ABVContentViewActivity {
}
public void setScaleZoomIcon(float scaleFactor) {
if (scaleFactor > 2.0f && scaleFactor <= 3.0f) {
if (scaleFactor > 2.5f && scaleFactor <= IFPDFConst.MAX_SCALE) {
btnScaleZoom03.setVisibility(View.VISIBLE);
btnScaleZoom02.setVisibility(View.GONE);
btnScaleZoom01.setVisibility(View.GONE);
mPageScrollView.setFixFlag(true);
mPageScrollView.setZoomingFlag(true);
} else if (scaleFactor > 1.0f && scaleFactor <= 2.0f) {
} else if (scaleFactor > 1.0f && scaleFactor <= 2.5f) {
btnScaleZoom03.setVisibility(View.GONE);
btnScaleZoom02.setVisibility(View.VISIBLE);
btnScaleZoom01.setVisibility(View.GONE);
......
......@@ -77,11 +77,7 @@ public class OperationTaskLayout extends RelativeLayout {
}
mWebView = new EnqueteWebView(context);
//mWebView.setHorizontalScrollBarEnabled(true);
//mWebView.setVerticalScrollBarEnabled(true);
mWebView.setVerticalScrollbarOverlay(true); // スクロールバー部分の隙間を消す
// mWebView.setWebViewClient(new WebViewClient());
mWebView.setWebContentsDebuggingEnabled(true); //デバッグモード(chromeからinspect可)
mWebView.addJavascriptInterface(jsInf, "android");
// //ブラウザの描画領域を対象としたイベントをフック
......@@ -104,8 +100,8 @@ public class OperationTaskLayout extends RelativeLayout {
mWebView.loadUrl(linkUrl);
RelativeLayout.LayoutParams params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
params.addRule(RelativeLayout.ALIGN_PARENT_TOP);
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
// params.addRule(RelativeLayout.ALIGN_PARENT_TOP);
// params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
addView(mWebView, params);
mWebView.setWebChromeClient(new WebChromeClient() {
......
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