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
759a293a
Commit
759a293a
authored
Feb 27, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#32576 作業指示ボタンの改善(ピン表示)
#32574 拡大状態でも作業指示・報告画面表示
parent
fd158993
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ProjectTaskLayout.java
+6
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ZoomRelativeLayout.java
+14
-7
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ProjectTaskLayout.java
View file @
759a293a
...
...
@@ -193,6 +193,7 @@ public class ProjectTaskLayout extends RelativeLayout {
}
else
{
final
PointF
pointView
=
rootLayout
.
convertToViewPoint
(
dto
.
pdfX
,
dto
.
pdfY
);
if
(
isShowPin
)
{
// ピンで表示
final
ActionProjectTaskPin
taskPin
=
new
ActionProjectTaskPin
(
context
,
dto
);
taskPin
.
taskKey
=
dto
.
taskKey
;
if
(
dto
.
isFinished
)
{
...
...
@@ -206,12 +207,13 @@ public class ProjectTaskLayout extends RelativeLayout {
params
=
new
RelativeLayout
.
LayoutParams
(
width
,
height
);
taskPin
.
setVisibility
(
View
.
INVISIBLE
);
rootLayout
.
addView
(
taskPin
,
params
);
// 座標x,yのセット
taskPin
.
setTranslationX
(
pointView
.
x
-
(
width
/
2
));
taskPin
.
setTranslationY
(
pointView
.
y
-
height
);
taskPin
.
setVisibility
(
View
.
VISIBLE
);
taskView
=
taskPin
;
}
else
{
// 作業コードで表示
final
ActionProjectTaskCode
taskCode
=
new
ActionProjectTaskCode
(
context
,
dto
);
//taskCode.startBlinkAnimation();
taskCode
.
taskKey
=
dto
.
taskKey
;
...
...
@@ -231,6 +233,7 @@ public class ProjectTaskLayout extends RelativeLayout {
public
void
run
()
{
Logger
.
d
(
TAG
,
String
.
format
(
"[ActionProjectTaskCode] : taskCode=%s, CODE_WIDTH=%d, fX=%d, fY=%d"
,
dto
.
taskCode
,
CODE_WIDTH
,
(
int
)
pointView
.
x
,
(
int
)
pointView
.
y
));
int
realWidth
=
taskCode
.
getWidth
();
//height is ready, sometimes realWidth = 0
// 座標x,yのセット
taskCode
.
setTranslationX
(
pointView
.
x
-
((
realWidth
>
0
?
realWidth
:
postWidth
)
/
2
));
taskCode
.
setTranslationY
(
pointView
.
y
-
(
postHeight
/
2
));
taskCode
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -497,9 +500,9 @@ public class ProjectTaskLayout extends RelativeLayout {
if
(
icon
.
taskKey
.
equals
(
TEMP_TASK_KEY
)
||
icon
.
taskKey
.
equals
(
taskKey
))
{
icon
.
stopAnimation
();
if
(
isTaskFinished
(
taskKey
))
{
icon
.
set
BackgroundColor
(
ProjectTaskLayout
.
COLOR_BLUE
);
icon
.
set
ImageResource
(
R
.
drawable
.
s_pin2
);
}
else
{
icon
.
set
BackgroundColor
(
ProjectTaskLayout
.
COLOR_ORANGE
);
icon
.
set
ImageResource
(
R
.
drawable
.
s_pin1
);
}
if
(
isDelete
||
icon
.
taskKey
.
equals
(
TEMP_TASK_KEY
))
{
currentLayout
.
removeView
(
v
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ZoomRelativeLayout.java
View file @
759a293a
...
...
@@ -274,6 +274,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
mLastTouchX
=
x
;
mLastTouchY
=
y
;
// 作業の座標をすべて調整する
changeTaskChildView
();
break
;
}
...
...
@@ -332,14 +333,17 @@ public class ZoomRelativeLayout extends RelativeLayout {
return
mPageView
;
}
/**
* 作業の座標をすべて調整する
*/
private
void
changeTaskChildView
()
{
if
(
getChildCount
()
>
0
)
{
for
(
int
i
=
0
;
i
<
getChildCount
();
i
++)
{
View
view
=
getChildAt
(
i
);
if
(
view
instanceof
ActionProjectTaskCode
)
{
setTaskTranslation
((
ActionProjectTaskCode
)
view
);
setTaskTranslation
Code
((
ActionProjectTaskCode
)
view
);
}
else
if
(
view
instanceof
ActionProjectTaskPin
)
{
setTaskTranslation
((
ActionProjectTaskPin
)
view
);
setTaskTranslation
Pin
((
ActionProjectTaskPin
)
view
);
}
}
}
...
...
@@ -349,7 +353,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
* ActionProjectTaskCodeのx,y座標をセット
* @param view
*/
private
void
setTaskTranslation
(
ActionProjectTaskCode
view
)
{
private
void
setTaskTranslation
Code
(
ActionProjectTaskCode
view
)
{
ProjectTaskDto
dto
=
view
.
mProjectTaskDto
;
PointF
point
=
convertToAuthoringPoint
(
dto
.
pdfX
,
dto
.
pdfY
);
view
.
setTranslationX
(
point
.
x
-
(
view
.
getWidth
()
/
2
));
...
...
@@ -360,7 +364,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
* ActionProjectTaskPinのx,y座標をセット
* @param view
*/
private
void
setTaskTranslation
(
ActionProjectTaskPin
view
)
{
private
void
setTaskTranslation
Pin
(
ActionProjectTaskPin
view
)
{
ProjectTaskDto
dto
=
view
.
mProjectTaskDto
;
PointF
point
=
convertToAuthoringPoint
(
dto
.
pdfX
,
dto
.
pdfY
);
view
.
setTranslationX
(
point
.
x
-
(
view
.
getWidth
()
/
2
));
...
...
@@ -491,7 +495,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
imgMatrix
.
postScale
(
detector
.
getScaleFactor
(),
detector
.
getScaleFactor
(),
detector
.
getFocusX
(),
detector
.
getFocusY
());
mScaleFactor
=
matrixScale
;
invalidate
();
}
}
// 作業の座標をすべて調整する
changeTaskChildView
();
Logger
.
v
(
TAG
,
"SimpleOnScaleGestureListener:[onScale]:scaleFactor=%s"
,
mScaleFactor
);
...
...
@@ -555,6 +559,8 @@ public class ZoomRelativeLayout extends RelativeLayout {
mPageScrollView
.
setZoomingFlag
(
false
);
imgMatrix
.
set
(
initMatrix
);
invalidate
();
// 作業の座標をすべて調整する
changeTaskChildView
();
}
else
{
mScaleFactor
=
matrixScale
;
...
...
@@ -617,6 +623,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
matrixValue
[
Matrix
.
MTRANS_Y
]
=
matrixY
;
imgMatrix
.
setValues
(
matrixValue
);
invalidate
();
// 作業の座標をすべて調整する
changeTaskChildView
();
Logger
.
v
(
TAG
,
"[fixPosition]invalidate"
);
}
...
...
@@ -679,7 +686,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
float
pdfX
=
(
x
*
scaleX
)
-
(
matrixX
*
scaleX
);
float
pdfY
=
(
y
*
scaleY
)
-
(
matrixY
*
scaleY
);
return
new
PointF
(
(
int
)
pdfX
,
(
int
)
pdfY
);
return
new
PointF
(
pdfX
,
pdfY
);
}
/**
...
...
@@ -697,7 +704,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
float
pdfX
=
(
x
*
scale
)
+
matrixX
;
float
pdfY
=
(
y
*
scale
)
+
matrixY
;
return
new
PointF
(
(
int
)
pdfX
,
(
int
)
pdfY
);
return
new
PointF
(
pdfX
,
pdfY
);
}
public
PointF
convertToViewPoint
(
float
x
,
float
y
)
{
...
...
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