Commit 5ef3cb6e by Lee Jaebin

PDF全画面対応を半分に戻す

parent 907fb6b4
...@@ -5175,6 +5175,19 @@ public class ContentViewActivity extends ABVContentViewActivity { ...@@ -5175,6 +5175,19 @@ public class ContentViewActivity extends ABVContentViewActivity {
List<OperationTaskDto> tasks = mTaskHotspotJSON.getPageTasks(pageNumber); List<OperationTaskDto> tasks = mTaskHotspotJSON.getPageTasks(pageNumber);
operationTaskLayout.addAllOperationTaskIcon(rootLayout, tasks); 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) { public void setCurrentOperationTask(OperationTaskDto operationTaskDto) {
......
...@@ -100,8 +100,8 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -100,8 +100,8 @@ public class OperationTaskLayout extends RelativeLayout {
mWebView.loadUrl(linkUrl); mWebView.loadUrl(linkUrl);
RelativeLayout.LayoutParams params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); RelativeLayout.LayoutParams params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
// params.addRule(RelativeLayout.ALIGN_PARENT_TOP); params.addRule(RelativeLayout.ALIGN_PARENT_TOP);
// params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
addView(mWebView, params); addView(mWebView, params);
mWebView.setWebChromeClient(new WebChromeClient() { mWebView.setWebChromeClient(new WebChromeClient() {
...@@ -282,15 +282,15 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -282,15 +282,15 @@ public class OperationTaskLayout extends RelativeLayout {
final String script = String.format(SCRIPT_SHOW_TASK_LIST, pageNum + 1); final String script = String.format(SCRIPT_SHOW_TASK_LIST, pageNum + 1);
RelativeLayout.LayoutParams params; RelativeLayout.LayoutParams params;
// if (isNormalSize) { if (isNormalSize) {
params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
// } else { } else {
// DisplayMetrics displayMetrics = getResources().getDisplayMetrics(); DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
// int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH); int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
// int screenWidth = displayMetrics.widthPixels; int screenWidth = displayMetrics.widthPixels;
// params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT); params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
// params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
// } }
setLayoutParams(params); setLayoutParams(params);
...@@ -339,60 +339,60 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -339,60 +339,60 @@ public class OperationTaskLayout extends RelativeLayout {
public void setTaskFormPosition(float screenX, boolean isNormalSize) { public void setTaskFormPosition(float screenX, boolean isNormalSize) {
RelativeLayout.LayoutParams params; RelativeLayout.LayoutParams params;
// if (isNormalSize) { if (isNormalSize) {
params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
// } else { } else {
// DisplayMetrics displayMetrics = getResources().getDisplayMetrics(); DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
// int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH); int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
// int screenWidth = displayMetrics.widthPixels; int screenWidth = displayMetrics.widthPixels;
// params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT); params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
//
// if (screenX < screenWidth / 2) { if (screenX < screenWidth / 2) {
// params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
// } else { } else {
// params.addRule(RelativeLayout.ALIGN_PARENT_LEFT); params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
// } }
// } }
setLayoutParams(params); setLayoutParams(params);
} }
public void setTaskFormPosition(String taskKey, boolean isNormalSize) { public void setTaskFormPosition(String taskKey, boolean isNormalSize) {
RelativeLayout.LayoutParams params; RelativeLayout.LayoutParams params;
// if (isNormalSize) { if (isNormalSize) {
params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
setLayoutParams(params); setLayoutParams(params);
// } else { } else {
// DisplayMetrics displayMetrics = getResources().getDisplayMetrics(); DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
//
// // #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
// // 作業報告画面を全画面に表示する // 作業報告画面を全画面に表示する
// int screenWidth = displayMetrics.widthPixels; int screenWidth = displayMetrics.widthPixels;
// params = createParam(screenWidth, ViewGroup.LayoutParams.WRAP_CONTENT); params = createParam(screenWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
// // #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
//
// if (!StringUtil.isNullOrEmpty(taskKey)) { if (!StringUtil.isNullOrEmpty(taskKey)) {
// TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey); TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
// if (taskDto != null) { if (taskDto != null) {
// OperationTaskDto operationTaskDto = new OperationTaskDto(); OperationTaskDto operationTaskDto = new OperationTaskDto();
// operationTaskDto.taskKey = taskDto.taskKey; operationTaskDto.taskKey = taskDto.taskKey;
// operationTaskDto.taskCode = taskDto.taskCode; operationTaskDto.taskCode = taskDto.taskCode;
//
// JSONObject hotSpot = new JSONObject(taskDto.taskHotSpotInfo); JSONObject hotSpot = new JSONObject(taskDto.taskHotSpotInfo);
// operationTaskDto.pdfX = hotSpot.getInt(ABookKeys.PDF_X); operationTaskDto.pdfX = hotSpot.getInt(ABookKeys.PDF_X);
// operationTaskDto.pdfY = hotSpot.getInt(ABookKeys.PDF_Y); operationTaskDto.pdfY = hotSpot.getInt(ABookKeys.PDF_Y);
//
// currentTaskDto = operationTaskDto; currentTaskDto = operationTaskDto;
//
// if (currentLayout.isLeftSideOfPdf((int)operationTaskDto.pdfX)) { if (currentLayout.isLeftSideOfPdf((int)operationTaskDto.pdfX)) {
// params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
// } else { } else {
// params.addRule(RelativeLayout.ALIGN_PARENT_LEFT); params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
// } }
// setLayoutParams(params); setLayoutParams(params);
// } }
// } }
// } }
} }
public int getAlignOfTaskLayer() { public int getAlignOfTaskLayer() {
......
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