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
adcea12a
Commit
adcea12a
authored
Apr 05, 2019
by
Lee Jaebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一時保存処理修正
PDFレンダリング処理修正 OZDのプレビュー処理
parent
d69c2733
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
58 additions
and
42 deletions
+58
-42
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+7
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+5
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
+36
-28
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/foxitPdf/FoxitPdfCore.java
+2
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/foxitPdf/PDFPageView.java
+2
-4
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/foxitPdf/PdfImageProvider.java
+3
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/foxitPdf/PdfThumbnailProvider.java
+1
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ThumbnailSeekBarLayout.java
+2
-3
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ZoomRelativeLayout.java
+0
-1
No files found.
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
adcea12a
...
...
@@ -958,6 +958,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
closeCurrentScreen
(
mOperationType
);
}
}
else
{
// ozd画面ではない一時保存処理時、コールバックを呼び出す
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_LOCAL_SAVE_TASK_REPORT
))
{
afterABookCheckApi
(
mCmd
,
mTaskKey
,
0
,
""
,
null
,
isOperationPdf
());
return
null
;
}
if
(
mAddReport
)
{
// 作業追加ありの場合
// コールバック処理のみ行う。
afterABookCheckApi
(
mCmd
,
mTaskKey
,
0
,
""
,
null
,
isOperationPdf
());
...
...
@@ -999,7 +1005,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_PREVIEW_REPORT_OZD
))
{
mReportFileName
=
abookCheckParam
.
get
(
ABookKeys
.
REPORT_FILE_NAME
);
// 作業報告画面改善
ActivityHandlingHelper
.
getInstance
().
startOZViewerActivity
(
this
,
mOperationId
,
getContentId
(),
mTaskKey
,
true
,
taskReportId
,
reportStartDate
,
mReportFileName
,
false
,
fals
e
,
taskReportLevel
);
ActivityHandlingHelper
.
getInstance
().
startOZViewerActivity
(
this
,
mOperationId
,
getContentId
(),
mTaskKey
,
true
,
taskReportId
,
reportStartDate
,
mReportFileName
,
false
,
tru
e
,
taskReportLevel
);
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_CONTENT_EDIT_CLOSE
))
{
showProgressPopup
();
handler
.
postDelayed
(
new
Runnable
()
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
adcea12a
...
...
@@ -217,6 +217,11 @@ public class OperationListActivity extends ABVUIActivity {
mCommunicationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_communication_menu
);
mCommonContentButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_common_content
);
// 作業一覧のタイトルパータンでセット
mTitleView
.
setText
(
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
operation_list
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
)));
mViewModeButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/CheckOZDViewActivity.java
View file @
adcea12a
...
...
@@ -109,36 +109,17 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
String
rearTitle
=
""
;
// TODO リソース変更
// if (mDirectionFlg) {
// リソースパターンの適用
// frontTitle = PatternStringUtil.patternToString(getApplicationContext(),
// R.string.title_operation_direction_form,
// getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0));
// } else {
frontTitle
=
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
title_operation_report_form
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
));
// }
if
(
mReadOnlyFlg
)
{
// リソースパターンの適用
rearTitle
=
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
title_preview
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
));
}
else
{
rearTitle
=
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
title_input
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
));
}
TextView
tvTitle
=
(
TextView
)
findViewById
(
R
.
id
.
tv_title
);
tvTitle
.
setText
(
frontTitle
+
rearTitle
);
// OZ閲覧画面に表示するボタン表示の可否設定
// 一時保存情報についてボタン表示:「0:false、一時保存ボタン非表示」「1:ture、一時保存ボタン表示」
mLocalSave
=
intent
.
getBooleanExtra
(
ABookKeys
.
LOCAL_SAVE
,
false
);
// 作業追加区分についてボタンを表示:「0:false、作業追加区分なし、作業一覧へボタン」「1:ture、作業追加区分あり、閉じるボタン」
mAddReport
=
intent
.
getBooleanExtra
(
ABookKeys
.
ADD_REPORT
,
fals
e
);
mAddReport
=
intent
.
getBooleanExtra
(
ABookKeys
.
ADD_REPORT
,
tru
e
);
final
Button
homeButton
=
(
Button
)
findViewById
(
R
.
id
.
btn_operation_home
);
final
Button
closeButton
=
(
Button
)
findViewById
(
R
.
id
.
btn_close
);
...
...
@@ -146,14 +127,41 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
final
Button
saveButton
=
(
Button
)
findViewById
(
R
.
id
.
btn_save
);
final
Button
deleteButton
=
(
Button
)
findViewById
(
R
.
id
.
btn_delete
);
// 一時ボタン表示可否判断
homeButton
.
setVisibility
(
mAddReport
?
View
.
GONE
:
View
.
VISIBLE
);
closeButton
.
setVisibility
(
mAddReport
?
View
.
VISIBLE
:
View
.
GONE
);
tempSaveButton
.
setVisibility
(
mLocalSave
?
View
.
VISIBLE
:
View
.
GONE
);
frontTitle
=
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
work_report
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
));
if
(
mReadOnlyFlg
)
{
// プレビューの場合
// リソースパターンの適用
rearTitle
=
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
title_preview
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
));
// クローズボタン以外非表示
closeButton
.
setVisibility
(
View
.
VISIBLE
);
homeButton
.
setVisibility
(
View
.
GONE
);
tempSaveButton
.
setVisibility
(
View
.
GONE
);
deleteButton
.
setVisibility
(
View
.
GONE
);
saveButton
.
setVisibility
(
View
.
GONE
);
}
else
{
// プレビューではない場合
// 削除ボタン表示可否判断
mIsOzFilePath
=
OzdFileHelper
.
checkOzFilePath
(
mOperationId
,
mTaskKey
,
mTaskReportId
,
mReportStartDate
,
mReportFileName
,
mTaskReportLevel
);
deleteButton
.
setVisibility
(
mIsOzFilePath
?
View
.
VISIBLE
:
View
.
GONE
);
rearTitle
=
PatternStringUtil
.
patternToString
(
getApplicationContext
(),
R
.
string
.
title_input
,
getUserPref
(
AppDefType
.
UserPrefKey
.
RESOURCE_PATTERN_TYPE
,
0
));
// 一時ボタン表示可否判断
homeButton
.
setVisibility
(
mAddReport
?
View
.
GONE
:
View
.
VISIBLE
);
closeButton
.
setVisibility
(
mAddReport
?
View
.
VISIBLE
:
View
.
GONE
);
tempSaveButton
.
setVisibility
(
mLocalSave
?
View
.
VISIBLE
:
View
.
GONE
);
// 削除ボタン表示可否判断
mIsOzFilePath
=
OzdFileHelper
.
checkOzFilePath
(
mOperationId
,
mTaskKey
,
mTaskReportId
,
mReportStartDate
,
mReportFileName
,
mTaskReportLevel
);
deleteButton
.
setVisibility
(
mIsOzFilePath
?
View
.
VISIBLE
:
View
.
GONE
);
}
// タイトルセット
tvTitle
.
setText
(
frontTitle
+
rearTitle
);
// 作業一覧へ戻るボタン
homeButton
.
setOnClickListener
(
new
OnClickListener
()
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/foxitPdf/FoxitPdfCore.java
View file @
adcea12a
...
...
@@ -164,9 +164,10 @@ public class FoxitPdfCore {
* @param patchH
* @return
*/
public
Bitmap
drawPage
(
Bitmap
bm
,
int
page
,
int
pageW
,
int
pageH
,
int
patchX
,
int
patchY
,
int
patchW
,
int
patchH
)
{
public
Bitmap
drawPage
(
int
page
,
int
pageW
,
int
pageH
,
int
patchX
,
int
patchY
,
int
patchW
,
int
patchH
)
{
Logger
.
i
(
TAG
,
"drawPage start."
);
synchronized
(
mContext
)
{
Bitmap
bm
=
Bitmap
.
createBitmap
(
patchW
,
patchH
,
Bitmap
.
Config
.
ARGB_8888
);
PDFPage
pdfPage
=
loadPage
(
mPDFDoc
,
page
,
PDFPage
.
e_ParsePageNormal
);
Renderer
renderer
=
null
;
Progressive
progressive
=
null
;
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/foxitPdf/PDFPageView.java
View file @
adcea12a
...
...
@@ -246,9 +246,7 @@ public class PDFPageView extends PageView {
if
(
pdfImageProvider
!=
null
)
{
pdfImageProvider
.
setPauseTask
(
true
);
}
Bitmap
patchBm
=
Bitmap
.
createBitmap
(
patchArea
.
width
(),
patchArea
.
height
(),
Config
.
ARGB_8888
);
patchBm
=
mFoxitPdfCore
.
drawPage
(
patchBm
,
mPageNumber
,
patchViewSize
.
x
,
patchViewSize
.
y
,
patchArea
.
left
,
patchArea
.
top
,
patchArea
.
width
(),
patchArea
.
height
());
mPatchBm
=
patchBm
;
mPatchBm
=
mFoxitPdfCore
.
drawPage
(
mPageNumber
,
patchViewSize
.
x
,
patchViewSize
.
y
,
patchArea
.
left
,
patchArea
.
top
,
patchArea
.
width
(),
patchArea
.
height
());
}
catch
(
OutOfMemoryError
e
)
{
Logger
.
e
(
TAG
,
"mDrawPatchTask.doInBackground() "
+
e
.
toString
());
}
finally
{
...
...
@@ -273,7 +271,7 @@ public class PDFPageView extends PageView {
}
};
Logger
.
v
(
TAG
,
"[createPatch]: page: "
+
mPageNumber
);
mDrawPatchTask
.
execute
OnExecutor
(
AsyncTask
.
THREAD_POOL_EXECUTOR
,
(
Void
[])
null
);
mDrawPatchTask
.
execute
(
);
}
public
void
releaseResources
()
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/foxitPdf/PdfImageProvider.java
View file @
adcea12a
...
...
@@ -308,9 +308,9 @@ public class PdfImageProvider {
int
height
=
(
int
)
(
size
.
y
*
pageScale
);
Logger
.
i
(
TAG
,
"[drawPage]: pageNumber="
+
pageNumber
+
" width="
+
width
+
" height="
+
height
+
" imagePath="
+
imagePath
);
Bitmap
bm
=
Bitmap
.
createBitmap
(
width
,
height
,
Config
.
ARGB_8888
)
;
Bitmap
bm
=
null
;
try
{
bm
=
mFoxitPdfCore
.
drawPage
(
bm
,
pageNumber
,
width
,
height
,
0
,
0
,
width
,
height
);
bm
=
mFoxitPdfCore
.
drawPage
(
pageNumber
,
width
,
height
,
0
,
0
,
width
,
height
);
}
catch
(
OutOfMemoryError
e
)
{
Logger
.
e
(
TAG
,
"mFoxitPdfCore.drawPage error."
+
e
.
toString
());
if
(
bm
!=
null
)
{
...
...
@@ -318,7 +318,7 @@ public class PdfImageProvider {
}
System
.
gc
();
try
{
bm
=
mFoxitPdfCore
.
drawPage
(
bm
,
pageNumber
,
width
,
height
,
0
,
0
,
width
,
height
);
bm
=
mFoxitPdfCore
.
drawPage
(
pageNumber
,
width
,
height
,
0
,
0
,
width
,
height
);
}
catch
(
OutOfMemoryError
e2
)
{
Logger
.
e
(
TAG
,
"mFoxitPdfCore.drawPage error."
+
e2
.
toString
());
if
(
bm
!=
null
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/foxitPdf/PdfThumbnailProvider.java
View file @
adcea12a
...
...
@@ -208,7 +208,7 @@ public class PdfThumbnailProvider {
pdfImageProvider
.
setPauseTask
(
true
);
}
bitmap
=
Bitmap
.
createBitmap
(
width
,
height
,
Config
.
ARGB_8888
);
bitmap
=
mFoxitPdfCore
.
drawPage
(
bitmap
,
page
,
width
,
height
,
0
,
0
,
width
,
height
);
bitmap
=
mFoxitPdfCore
.
drawPage
(
page
,
width
,
height
,
0
,
0
,
width
,
height
);
}
finally
{
if
(
pdfImageProvider
!=
null
)
{
pdfImageProvider
.
setPauseTask
(
false
);
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ThumbnailSeekBarLayout.java
View file @
adcea12a
...
...
@@ -335,7 +335,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
bitmap
=
readFromFile
(
page
,
false
);
if
(
bitmap
==
null
)
{
bitmap
=
Bitmap
.
createBitmap
(
largeWidth
,
largeHeight
,
Config
.
ARGB_8888
);
bitmap
=
mFoxitPdfCore
.
drawPage
(
bitmap
,
page
,
largeWidth
,
largeHeight
,
0
,
0
,
largeWidth
,
largeHeight
);
// PDF描画
bitmap
=
mFoxitPdfCore
.
drawPage
(
page
,
largeWidth
,
largeHeight
,
0
,
0
,
largeWidth
,
largeHeight
);
// PDF描画
}
}
finally
{
if
(
pdfImageProvider
!=
null
)
{
...
...
@@ -473,8 +473,7 @@ public class ThumbnailSeekBarLayout extends LinearLayout {
}
pageBitmap
=
readFromFile
(
page
,
true
);
if
(
pageBitmap
==
null
)
{
pageBitmap
=
Bitmap
.
createBitmap
(
midWidth
,
midHeight
,
Config
.
ARGB_8888
);
pageBitmap
=
mFoxitPdfCore
.
drawPage
(
pageBitmap
,
page
,
midWidth
,
midHeight
,
0
,
0
,
midWidth
,
midHeight
);
// PDF描画
pageBitmap
=
mFoxitPdfCore
.
drawPage
(
page
,
midWidth
,
midHeight
,
0
,
0
,
midWidth
,
midHeight
);
// PDF描画
}
}
finally
{
if
(
pdfImageProvider
!=
null
)
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/ZoomRelativeLayout.java
View file @
adcea12a
...
...
@@ -184,7 +184,6 @@ public class ZoomRelativeLayout extends RelativeLayout {
canvas
.
concat
(
imgMatrix
);
}
super
.
dispatchDraw
(
canvas
);
invalidate
();
canvas
.
restore
();
}
...
...
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