Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abook_check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_android
abook_check
Commits
5ef3cb6e
Commit
5ef3cb6e
authored
Apr 05, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDF全画面対応を半分に戻す
parent
907fb6b4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
55 deletions
+68
-55
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
+13
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/OperationTaskLayout.java
+55
-55
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ContentViewActivity.java
View file @
5ef3cb6e
...
...
@@ -5175,6 +5175,19 @@ 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
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/OperationTaskLayout.java
View file @
5ef3cb6e
...
...
@@ -100,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
()
{
...
...
@@ -282,15 +282,15 @@ public class OperationTaskLayout extends RelativeLayout {
final
String
script
=
String
.
format
(
SCRIPT_SHOW_TASK_LIST
,
pageNum
+
1
);
RelativeLayout
.
LayoutParams
params
;
//
if (isNormalSize) {
if
(
isNormalSize
)
{
params
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
//
} else {
//
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(RelativeLayout.ALIGN_PARENT_RIGHT);
//
}
}
else
{
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
(
RelativeLayout
.
ALIGN_PARENT_RIGHT
);
}
setLayoutParams
(
params
);
...
...
@@ -339,60 +339,60 @@ public class OperationTaskLayout extends RelativeLayout {
public
void
setTaskFormPosition
(
float
screenX
,
boolean
isNormalSize
)
{
RelativeLayout
.
LayoutParams
params
;
//
if (isNormalSize) {
if
(
isNormalSize
)
{
params
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
//
} else {
//
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
//
int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
//
int screenWidth = displayMetrics.widthPixels;
//
params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
//
//
if (screenX < screenWidth / 2) {
//
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
//
} else {
//
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
//
}
//
}
}
else
{
DisplayMetrics
displayMetrics
=
getResources
().
getDisplayMetrics
();
int
halfWidth
=
(
int
)
(
displayMetrics
.
density
*
OperationTaskLayout
.
HALF_WIDTH
);
int
screenWidth
=
displayMetrics
.
widthPixels
;
params
=
createParam
(
halfWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
if
(
screenX
<
screenWidth
/
2
)
{
params
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_RIGHT
);
}
else
{
params
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_LEFT
);
}
}
setLayoutParams
(
params
);
}
public
void
setTaskFormPosition
(
String
taskKey
,
boolean
isNormalSize
)
{
RelativeLayout
.
LayoutParams
params
;
//
if (isNormalSize) {
if
(
isNormalSize
)
{
params
=
createParam
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
setLayoutParams
(
params
);
//
} else {
//
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
//
//
// #32926 作業報告画面改善 start
//
// 作業報告画面を全画面に表示する
//
int screenWidth = displayMetrics.widthPixels;
//
params = createParam(screenWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
//
// #32926 作業報告画面改善 end
//
//
if (!StringUtil.isNullOrEmpty(taskKey)) {
//
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
//
if (taskDto != null) {
//
OperationTaskDto operationTaskDto = new OperationTaskDto();
//
operationTaskDto.taskKey = taskDto.taskKey;
//
operationTaskDto.taskCode = taskDto.taskCode;
//
//
JSONObject hotSpot = new JSONObject(taskDto.taskHotSpotInfo);
//
operationTaskDto.pdfX = hotSpot.getInt(ABookKeys.PDF_X);
//
operationTaskDto.pdfY = hotSpot.getInt(ABookKeys.PDF_Y);
//
//
currentTaskDto = operationTaskDto;
//
//
if (currentLayout.isLeftSideOfPdf((int)operationTaskDto.pdfX)) {
//
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
//
} else {
//
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
//
}
//
setLayoutParams(params);
//
}
//
}
//
}
}
else
{
DisplayMetrics
displayMetrics
=
getResources
().
getDisplayMetrics
();
// #32926 作業報告画面改善 start
// 作業報告画面を全画面に表示する
int
screenWidth
=
displayMetrics
.
widthPixels
;
params
=
createParam
(
screenWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
// #32926 作業報告画面改善 end
if
(!
StringUtil
.
isNullOrEmpty
(
taskKey
))
{
TaskDto
taskDto
=
mTaskDao
.
getTaskByTaskKey
(
taskKey
);
if
(
taskDto
!=
null
)
{
OperationTaskDto
operationTaskDto
=
new
OperationTaskDto
();
operationTaskDto
.
taskKey
=
taskDto
.
taskKey
;
operationTaskDto
.
taskCode
=
taskDto
.
taskCode
;
JSONObject
hotSpot
=
new
JSONObject
(
taskDto
.
taskHotSpotInfo
);
operationTaskDto
.
pdfX
=
hotSpot
.
getInt
(
ABookKeys
.
PDF_X
);
operationTaskDto
.
pdfY
=
hotSpot
.
getInt
(
ABookKeys
.
PDF_Y
);
currentTaskDto
=
operationTaskDto
;
if
(
currentLayout
.
isLeftSideOfPdf
((
int
)
operationTaskDto
.
pdfX
))
{
params
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_RIGHT
);
}
else
{
params
.
addRule
(
RelativeLayout
.
ALIGN_PARENT_LEFT
);
}
setLayoutParams
(
params
);
}
}
}
}
public
int
getAlignOfTaskLayer
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment