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
90cadb02
Commit
90cadb02
authored
Jul 12, 2019
by
Jeong Gilmo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#33721 手書きパレット機能の追加
- 課題表のNo.37 フォーム・作業を新規で作成しても切れた状態で表示される。 端末情報:HUAWEI P10 lite について修正 - 画面回転の条件を追加
parent
3ebbc35a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
25 deletions
+19
-25
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+4
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ParentWebViewActivity.java
+0
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/PhotoEditActivity.java
+15
-24
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
90cadb02
...
...
@@ -1367,7 +1367,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
if
(
FileUtil
.
exists
(
tempImagePath
)){
//Tempパスにファイルがある場合、編集を実行
//編集画面をコール
if
(
isRotatable
())
{
setFixedOrientation
(
true
);
//回転固定
}
PhotoEditActivity
dialog
=
new
PhotoEditActivity
(
ABVContentViewActivity
.
this
,
tempImagePath
);
//ロードして編集するイメージのパスを設定
showPhotoEditDialog
(
dialog
);
dialog
.
setOnDismissListener
(
new
DialogInterface
.
OnDismissListener
()
{
...
...
@@ -1377,8 +1379,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
webViewLoadUrl
(
String
.
format
(
"javascript:document.getElementById('reportForm').contentWindow.changeThumbnailTagForAnd('%s','%s')"
,
attachedFilename
,
tempImagePath
));
afterABookCheckApi
(
cmd
,
taskKey
,
0
,
""
,
null
);
mPhotoEditDialog
=
null
;
if
(
isRotatable
())
{
setFixedOrientation
(
false
);
////回転可能
}
}
});
}
else
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ParentWebViewActivity.java
View file @
90cadb02
...
...
@@ -120,7 +120,6 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
mLocalFile
=
null
;
//編集可能可否をチェックする。
if
(
mEnablePhotoEdit
.
equals
(
"1"
))
{
//編集の場合、編集画面を開ける。
setFixedOrientation
(
true
);
commonOpenEditPage
();
}
}
catch
(
Exception
e
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/PhotoEditActivity.java
View file @
90cadb02
...
...
@@ -37,11 +37,10 @@ public class PhotoEditActivity extends Dialog {
private
final
String
TAG
=
"PhotoEditActivity"
;
private
final
String
editToolPath
=
"file:///android_asset/Drawing/index.html"
;
//EditToolのパス。
private
final
String
editToolName
=
"Drawing"
;
//EditToolの名
private
final
float
screenToDialogRatio
=
0.8f
;
// 編集画面のタイアローグに表示するイメージの比率
private
WebView
editPageWebView
;
//ダイアローグの上に編集画面をロード
private
Bitmap
bitmapOfPhoto
;
//写真のBitmap情報
private
in
t
photoWidth
;
private
in
t
photoHeight
;
private
floa
t
photoWidth
;
private
floa
t
photoHeight
;
private
String
photoFilePath
;
//ロードして修正するファイルのパス
private
JsInf
jsInf
=
new
JsInf
();
//Javascript Interface
private
Context
context
;
...
...
@@ -79,29 +78,21 @@ public class PhotoEditActivity extends Dialog {
Rect
displayRectangle
=
new
Rect
();
Window
window
=
((
Activity
)
context
).
getWindow
();
window
.
getDecorView
().
getWindowVisibleDisplayFrame
(
displayRectangle
);
float
photoRatio
=
photoWidth
/
photoHeight
;
//画面の横と縦の割合
float
displayHeight
=
(
float
)
displayRectangle
.
height
();
//画面の縦幅
float
displayWidth
=
(
float
)
displayRectangle
.
width
();
//画面の横幅
int
dialogWidth
=
(
int
)
(
displayHeight
*
photoRatio
);
//ダイアローグの横幅を縦幅について計算
if
(
photoRatio
>
1
){
dialogWidth
=
(
int
)
(
dialogWidth
*
0.75f
);
}
//横の写真はダイアローグの横幅を75パーセントに計算
else
{
dialogWidth
=
(
int
)
(
dialogWidth
*
0.9f
);
}
//縦の写真はダイアローグの横幅を90パーセントに計算
if
(
getWindow
()
!=
null
)
{
//画面の方向によってダイアローグのサイズを決定
int
screenOrientation
=
context
.
getResources
().
getConfiguration
().
orientation
;
//画面の方向
switch
(
screenOrientation
)
{
case
Surface
.
ROTATION_0
:
case
Surface
.
ROTATION_180
:
//横
float
photoRatio
=
(
float
)
photoWidth
/
(
float
)
photoHeight
;
//画面の横と縦の割合
float
displayHeight
=
(
float
)
displayRectangle
.
height
()
*
screenToDialogRatio
;
//画面の縦幅の90パーセント
float
displayWidth
=
(
float
)
displayRectangle
.
width
()
*
screenToDialogRatio
;
//画面の横幅の90パーセント
int
dialogWidth
=
(
int
)
(
displayHeight
*
photoRatio
);
//ダイアローグの横幅を計算
if
(
dialogWidth
<
displayWidth
)
{
//計算した横幅が画面より小さい場合はそのまま設定
getWindow
().
setLayout
(
dialogWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
//ViewGroup.LayoutParams.WRAP_CONTENT);
}
else
{
//計算した横幅が画面より大き場合は画面の横幅に設定
getWindow
().
setLayout
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
}
break
;
case
Surface
.
ROTATION_90
:
case
Surface
.
ROTATION_270
:
//縦
//画面方向が縦の場合、画面の横幅に設定
if
(
dialogWidth
<
displayWidth
)
{
//計算した横幅が画面より小さい場合はそのまま設定
getWindow
().
setLayout
(
dialogWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
}
else
{
//計算した横幅が画面より大き場合は画面の横幅に反映
getWindow
().
setLayout
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
break
;
}
}
...
...
@@ -138,7 +129,7 @@ public class PhotoEditActivity extends Dialog {
if
(
url
.
contains
(
editToolName
))
{
//最初ページロードの場合
//ページロードの終了後のCanvas設定
float
photoRatio
=
(
float
)
photoHeight
/
(
float
)
photoWidth
;
//写真の割合を計算
float
photoRatio
=
photoHeight
/
photoWidth
;
//写真の割合を計算
view
.
loadUrl
(
String
.
format
(
"javascript:resizeCanvasToRatio(%f);"
,
photoRatio
));
//写真の割合によってCanvasのサイズを決める。
view
.
loadUrl
(
String
.
format
(
"javascript:setBackground('%s');"
,
photoFilePath
));
//Canvasの背景をイメージにする
}
...
...
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