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
88bdeb21
Commit
88bdeb21
authored
Jul 04, 2019
by
Kim Jinsung
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/1.0.500_#33721' into 'features/1.0.500'
#33721 手書きパレット機能の追加 See merge request
!15
parents
471da81d
da952a00
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+3
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/PhotoEditActivity.java
+7
-10
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
88bdeb21
...
@@ -13,6 +13,7 @@ import android.provider.MediaStore;
...
@@ -13,6 +13,7 @@ import android.provider.MediaStore;
import
android.view.Gravity
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.MotionEvent
;
import
android.view.MotionEvent
;
import
android.view.OrientationEventListener
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView
;
...
@@ -239,7 +240,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -239,7 +240,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override
@Override
protected
void
onResume
()
{
protected
void
onResume
()
{
super
.
onResume
();
super
.
onResume
();
try
{
try
{
if
(
readingLogFlg
)
{
if
(
readingLogFlg
)
{
readingLogId
=
ContentLogUtil
.
getInstance
().
startContentReadLog
(
this
,
contentId
,
getABVUIDataCache
().
getPermissionAccessLocation
());
readingLogId
=
ContentLogUtil
.
getInstance
().
startContentReadLog
(
this
,
contentId
,
getABVUIDataCache
().
getPermissionAccessLocation
());
...
@@ -1356,6 +1356,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1356,6 +1356,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
if
(
FileUtil
.
exists
(
tempImagePath
)){
//Tempパスにファイルがある場合、編集を実行
if
(
FileUtil
.
exists
(
tempImagePath
)){
//Tempパスにファイルがある場合、編集を実行
//編集画面をコール
//編集画面をコール
setFixedOrientation
(
true
);
//回転固定
PhotoEditActivity
dialog
=
new
PhotoEditActivity
(
ABVContentViewActivity
.
this
,
tempImagePath
);
//ロードして編集するイメージのパスを設定
PhotoEditActivity
dialog
=
new
PhotoEditActivity
(
ABVContentViewActivity
.
this
,
tempImagePath
);
//ロードして編集するイメージのパスを設定
showPhotoEditDialog
(
dialog
);
showPhotoEditDialog
(
dialog
);
dialog
.
setOnDismissListener
(
new
DialogInterface
.
OnDismissListener
()
{
dialog
.
setOnDismissListener
(
new
DialogInterface
.
OnDismissListener
()
{
...
@@ -1365,6 +1366,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1365,6 +1366,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
webViewLoadUrl
(
String
.
format
(
"javascript:document.getElementById('reportForm').contentWindow.changeThumbnailTagForAnd('%s','%s')"
,
mAttachedFileName
,
tempImagePath
));
webViewLoadUrl
(
String
.
format
(
"javascript:document.getElementById('reportForm').contentWindow.changeThumbnailTagForAnd('%s','%s')"
,
mAttachedFileName
,
tempImagePath
));
afterABookCheckApi
(
mCmd
,
mTaskKey
,
0
,
""
,
null
);
afterABookCheckApi
(
mCmd
,
mTaskKey
,
0
,
""
,
null
);
mPhotoEditDialog
=
null
;
mPhotoEditDialog
=
null
;
setFixedOrientation
(
false
);
////回転可能
}
}
});
});
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/PhotoEditActivity.java
View file @
88bdeb21
...
@@ -11,11 +11,7 @@ import android.graphics.Canvas;
...
@@ -11,11 +11,7 @@ import android.graphics.Canvas;
import
android.graphics.Matrix
;
import
android.graphics.Matrix
;
import
android.graphics.Rect
;
import
android.graphics.Rect
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.text.Layout
;
import
android.util.Base64
;
import
android.util.Base64
;
import
android.util.Log
;
import
android.view.Display
;
import
android.view.LayoutInflater
;
import
android.view.Surface
;
import
android.view.Surface
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -23,11 +19,9 @@ import android.view.Window;
...
@@ -23,11 +19,9 @@ import android.view.Window;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
android.webkit.DownloadListener
;
import
android.webkit.DownloadListener
;
import
android.webkit.JavascriptInterface
;
import
android.webkit.JavascriptInterface
;
import
android.webkit.WebSettings
;
import
android.webkit.WebView
;
import
android.webkit.WebView
;
import
android.webkit.WebViewClient
;
import
android.webkit.WebViewClient
;
import
android.widget.ImageButton
;
import
android.widget.ImageButton
;
import
android.widget.Toast
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.FileOutputStream
;
...
@@ -71,8 +65,6 @@ public class PhotoEditActivity extends Dialog {
...
@@ -71,8 +65,6 @@ public class PhotoEditActivity extends Dialog {
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
//ダイアローグの設定
//ダイアローグの設定
screenRequestedOrientation
=
((
Activity
)
context
).
getRequestedOrientation
();
//編集前の画面方向を保存する。
((
Activity
)
context
).
setRequestedOrientation
(
ActivityInfo
.
SCREEN_ORIENTATION_LOCKED
);
// 縦画面固定
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
//ダイアローグのタイトルバーを消す
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
//ダイアローグのタイトルバーを消す
setContentView
(
R
.
layout
.
photo_edit_dialog
);
//ダイアローグにWebViewを設定
setContentView
(
R
.
layout
.
photo_edit_dialog
);
//ダイアローグにWebViewを設定
setCanceledOnTouchOutside
(
false
);
//編集画面の外をタッチしてもダイアローグを閉じらないようにする。
setCanceledOnTouchOutside
(
false
);
//編集画面の外をタッチしてもダイアローグを閉じらないようにする。
...
@@ -94,7 +86,7 @@ public class PhotoEditActivity extends Dialog {
...
@@ -94,7 +86,7 @@ public class PhotoEditActivity extends Dialog {
case
Surface
.
ROTATION_0
:
case
Surface
.
ROTATION_180
:
//横
case
Surface
.
ROTATION_0
:
case
Surface
.
ROTATION_180
:
//横
float
photoRatio
=
(
float
)
photoWidth
/
(
float
)
photoHeight
;
//画面の横と縦の割合
float
photoRatio
=
(
float
)
photoWidth
/
(
float
)
photoHeight
;
//画面の横と縦の割合
float
displayHeight
=
displayRectangle
.
height
()
*
0.9f
;
//画面の縦幅の90パーセント
float
displayHeight
=
displayRectangle
.
height
()
*
0.9f
;
//画面の縦幅の90パーセント
float
displayWidth
=
displayRectangle
.
width
()
*
0.9f
;
//画面の
縦
幅の90パーセント
float
displayWidth
=
displayRectangle
.
width
()
*
0.9f
;
//画面の
横
幅の90パーセント
int
dialogWidth
=
(
int
)
(
displayHeight
*
photoRatio
);
//ダイアローグの横幅を計算
int
dialogWidth
=
(
int
)
(
displayHeight
*
photoRatio
);
//ダイアローグの横幅を計算
if
(
dialogWidth
<
displayWidth
){
//計算した横幅が画面より小さい場合はそのまま設定
if
(
dialogWidth
<
displayWidth
){
//計算した横幅が画面より小さい場合はそのまま設定
getWindow
().
setLayout
(
dialogWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
getWindow
().
setLayout
(
dialogWidth
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
);
...
@@ -209,7 +201,6 @@ public class PhotoEditActivity extends Dialog {
...
@@ -209,7 +201,6 @@ public class PhotoEditActivity extends Dialog {
*/
*/
private
void
superDismiss
(){
private
void
superDismiss
(){
super
.
dismiss
();
super
.
dismiss
();
((
Activity
)
context
).
setRequestedOrientation
(
screenRequestedOrientation
);
// 縦画面固定
}
}
/**
/**
...
@@ -333,4 +324,9 @@ public class PhotoEditActivity extends Dialog {
...
@@ -333,4 +324,9 @@ public class PhotoEditActivity extends Dialog {
return
scaledBitmap
;
return
scaledBitmap
;
}
}
@Override
public
void
onWindowAttributesChanged
(
WindowManager
.
LayoutParams
params
)
{
return
;
}
}
}
\ No newline at end of file
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