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
bb42b57b
Commit
bb42b57b
authored
Jan 22, 2020
by
nakamura akane
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'features/1.2.0_ogawa-y' into 'contract/kagome/1.2.1'
Features/1.2.0 ogawa y See merge request
!60
parents
d26dffd4
9ccf8f07
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
193 additions
and
33 deletions
+193
-33
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
+10
-0
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_operation_home_wide.png
+0
-0
ABVJE_UI_Android/res/layout/ac_html_webview.xml
+2
-7
ABVJE_UI_Android/src/jp/agentec/abook/abv/launcher/android/ABVUIDataCache.java
+6
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/Interface/KeyActionCallback.java
+8
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
+11
-4
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
+38
-1
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
+52
-21
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ParentWebViewActivity.java
+18
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/CheckFormWebview.java
+48
-0
No files found.
ABVJE_BL/src/jp/agentec/abook/abv/bl/common/constant/ABookKeys.java
View file @
bb42b57b
...
@@ -35,6 +35,7 @@ public class ABookKeys {
...
@@ -35,6 +35,7 @@ public class ABookKeys {
public
static
final
String
CMD_SHOW_RELATED_CONTENT
=
"showRelatedContent"
;
public
static
final
String
CMD_SHOW_RELATED_CONTENT
=
"showRelatedContent"
;
public
static
final
String
CMD_PAGE_NUM
=
"pageNum"
;
public
static
final
String
CMD_PAGE_NUM
=
"pageNum"
;
public
static
final
String
CMD_LABEL_PRINT
=
"labelPrint"
;
public
static
final
String
CMD_LABEL_PRINT
=
"labelPrint"
;
public
static
final
String
CMD_ABNORMALITY_REPORT
=
"abnormalityReport"
;
public
static
final
String
GPS_TYPE
=
"gpsType"
;
public
static
final
String
GPS_TYPE
=
"gpsType"
;
public
static
final
String
STATUS_CODE
=
"statusCode"
;
public
static
final
String
STATUS_CODE
=
"statusCode"
;
...
@@ -54,6 +55,15 @@ public class ABookKeys {
...
@@ -54,6 +55,15 @@ public class ABookKeys {
public
static
final
String
LABEL_LOT_NUMBER_QR
=
"lotNumberQR"
;
public
static
final
String
LABEL_LOT_NUMBER_QR
=
"lotNumberQR"
;
// KAGOME対応 ラベル印刷パラメータend
// KAGOME対応 ラベル印刷パラメータend
// KAGOME対応Ph2 品質異常報告パラメータstart
public
static
final
String
UBNORMALITY_REPORT_OPERATION_ID
=
"operationId"
;
public
static
final
String
UBNORMALITY_REPORT_CONTENT_ID
=
"contentId"
;
public
static
final
String
UBNORMALITY_REPORT_LOT_NUMBER_7_FIGURE
=
"lotNumber7"
;
public
static
final
String
UBNORMALITY_REPORT_ITEM_NO
=
"itemNo"
;
public
static
final
String
UBNORMALITY_REPORT_FARM_NO
=
"farmNo"
;
public
static
final
String
UBNORMALITY_REPORT_SHIPPING_SOURCE_NO
=
"shippingSourceNo"
;
// KAGOME対応 品質異常報告パラメータend
// #32782 指示者テーブル関連削除 start
// #32782 指示者テーブル関連削除 start
// TODO change TASK_DIRECTIONS 削除が必要
// TODO change TASK_DIRECTIONS 削除が必要
// public static final String TASK_DIRECTIONS = "taskReport";
// public static final String TASK_DIRECTIONS = "taskReport";
...
...
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_operation_home_wide.png
0 → 100644
View file @
bb42b57b
5.85 KB
ABVJE_UI_Android/res/layout/ac_html_webview.xml
View file @
bb42b57b
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"15dp"
android:layout_marginLeft=
"15dp"
android:visibility=
"gone"
android:visibility=
"gone"
android:background=
"@drawable/ic_operation_home"
android:background=
"@drawable/ic_operation_home
_wide
"
android:contentDescription=
"@string/cont_desc"
/>
android:contentDescription=
"@string/cont_desc"
/>
<ImageButton
<ImageButton
android:id=
"@+id/btn_remote_pause"
android:id=
"@+id/btn_remote_pause"
...
@@ -184,17 +184,12 @@
...
@@ -184,17 +184,12 @@
</RelativeLayout>
</RelativeLayout>
<FrameLayout
<FrameLayout
android:id=
"@+id/frameWebView"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<WebView
android:id=
"@+id/webView2"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"0dp"
/>
<ProgressBar
<ProgressBar
android:id=
"@+id/refresh_prog"
android:id=
"@+id/refresh_prog"
style=
"?android:attr/progressBarStyleLarge"
style=
"?android:attr/progressBarStyleLarge"
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/launcher/android/ABVUIDataCache.java
View file @
bb42b57b
...
@@ -14,7 +14,10 @@ import jp.agentec.adf.util.DateTimeUtil;
...
@@ -14,7 +14,10 @@ import jp.agentec.adf.util.DateTimeUtil;
import
jp.agentec.adf.util.StringUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
android.content.Context
;
import
android.content.Context
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Stack
;
import
java.util.Stack
;
public
class
ABVUIDataCache
{
public
class
ABVUIDataCache
{
...
@@ -44,6 +47,9 @@ public class ABVUIDataCache {
...
@@ -44,6 +47,9 @@ public class ABVUIDataCache {
//コンテンツビューからコンテンツビューへ戻る時のコンテンツ情報リスト
//コンテンツビューからコンテンツビューへ戻る時のコンテンツ情報リスト
public
List
<
long
[]>
returnContentIdList
=
new
ArrayList
<>();
public
List
<
long
[]>
returnContentIdList
=
new
ArrayList
<>();
// KAGOME Ph2 検品→品質異常報告遷移時の引継ぎパラメータ
public
Map
<
String
,
String
>
ubnormalityReportParam
=
new
HashMap
<>();
/**
/**
* 最上部に表示されているActivityのクラス名、つまりユーザに見えているActivityのクラス名です。<br>
* 最上部に表示されているActivityのクラス名、つまりユーザに見えているActivityのクラス名です。<br>
* Activityにfocusがあるかどうかをもとにアプリがバックグラウンドになったかを判断します。
* Activityにfocusがあるかどうかをもとにアプリがバックグラウンドになったかを判断します。
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/Interface/KeyActionCallback.java
0 → 100644
View file @
bb42b57b
package
jp
.
agentec
.
abook
.
abv
.
ui
.
Interface
;
/**
* Created by ogawa-y on 2020/01/21.
*/
public
interface
KeyActionCallback
{
void
keyActionCallback
();
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
View file @
bb42b57b
...
@@ -14,7 +14,6 @@ import android.util.Xml;
...
@@ -14,7 +14,6 @@ import android.util.Xml;
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
;
...
@@ -41,7 +40,6 @@ import java.io.FileNotFoundException;
...
@@ -41,7 +40,6 @@ import java.io.FileNotFoundException;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.StringReader
;
import
java.io.StringReader
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
...
@@ -1106,8 +1104,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
...
@@ -1106,8 +1104,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
abookCheckParam
.
get
(
ABookKeys
.
LABEL_LOT_NUMBER
),
abookCheckParam
.
get
(
ABookKeys
.
LABEL_LOT_NUMBER
),
abookCheckParam
.
get
(
ABookKeys
.
LABEL_OPERATION_NO
),
abookCheckParam
.
get
(
ABookKeys
.
LABEL_OPERATION_NO
),
abookCheckParam
.
get
(
ABookKeys
.
LABEL_LOT_NUMBER_QR
));
abookCheckParam
.
get
(
ABookKeys
.
LABEL_LOT_NUMBER_QR
));
}
else
if
(
mCmd
.
equals
(
ABookKeys
.
CMD_ABNORMALITY_REPORT
))
{
// KAGOME対応Ph2 検品からの品質異常報告
// 品質異常の初期値を設定
Map
<
String
,
String
>
param
=
getABVUIDataCache
().
ubnormalityReportParam
;
param
.
put
(
ABookKeys
.
UBNORMALITY_REPORT_LOT_NUMBER_7_FIGURE
,
abookCheckParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_LOT_NUMBER_7_FIGURE
));
param
.
put
(
ABookKeys
.
UBNORMALITY_REPORT_ITEM_NO
,
abookCheckParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_ITEM_NO
));
param
.
put
(
ABookKeys
.
UBNORMALITY_REPORT_FARM_NO
,
abookCheckParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_FARM_NO
));
param
.
put
(
ABookKeys
.
UBNORMALITY_REPORT_SHIPPING_SOURCE_NO
,
abookCheckParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_SHIPPING_SOURCE_NO
));
// 品質異常へ遷移
ActivityHandlingHelper
.
getInstance
().
abnormalityReport
(
abookCheckParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_OPERATION_ID
),
abookCheckParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_CONTENT_ID
));
}
}
}
}
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ActivityHandlingHelper.java
View file @
bb42b57b
...
@@ -31,7 +31,9 @@ import jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON;
...
@@ -31,7 +31,9 @@ import jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON;
import
jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON
;
import
jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON
;
import
jp.agentec.abook.abv.bl.acms.type.DeliveryType
;
import
jp.agentec.abook.abv.bl.acms.type.DeliveryType
;
import
jp.agentec.abook.abv.bl.acms.type.DownloadStatusType
;
import
jp.agentec.abook.abv.bl.acms.type.DownloadStatusType
;
import
jp.agentec.abook.abv.bl.acms.type.OperationType
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.ABVEnvironment
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.exception.AcmsException
;
import
jp.agentec.abook.abv.bl.common.exception.AcmsException
;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
import
jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException
;
...
@@ -48,6 +50,7 @@ import jp.agentec.abook.abv.bl.download.ContentRefresher;
...
@@ -48,6 +50,7 @@ import jp.agentec.abook.abv.bl.download.ContentRefresher;
import
jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification
;
import
jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.dto.MeetingDto
;
import
jp.agentec.abook.abv.bl.dto.MeetingDto
;
import
jp.agentec.abook.abv.bl.dto.OperationDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic
;
import
jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic
;
...
@@ -94,6 +97,8 @@ import jp.agentec.adf.util.FileUtil;
...
@@ -94,6 +97,8 @@ import jp.agentec.adf.util.FileUtil;
import
jp.agentec.adf.util.RuntimeUtil
;
import
jp.agentec.adf.util.RuntimeUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
jp.agentec.adf.util.StringUtil
;
import
static
org
.
chromium
.
base
.
ThreadUtils
.
runOnUiThread
;
// TODO: synchronizedメソッドは、currentActivityStackによるブロックに変更
// TODO: synchronizedメソッドは、currentActivityStackによるブロックに変更
// TODO: リファクタリング ActivityStackとActivity起動とMeeting関係をクラス分離
// TODO: リファクタリング ActivityStackとActivity起動とMeeting関係をクラス分離
public
class
ActivityHandlingHelper
extends
ABookHelper
implements
RemoteObserver
,
ContentDownloadListener
{
public
class
ActivityHandlingHelper
extends
ABookHelper
implements
RemoteObserver
,
ContentDownloadListener
{
...
@@ -1713,7 +1718,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
...
@@ -1713,7 +1718,7 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
}
}
}
}
}
}
return
context
;
return
null
;
}
}
/**
/**
...
@@ -1731,4 +1736,36 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
...
@@ -1731,4 +1736,36 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
public
void
setPreviousOfSettingActivity
(
ABVUIActivity
activity
)
{
public
void
setPreviousOfSettingActivity
(
ABVUIActivity
activity
)
{
this
.
previousOfSettingActivity
=
activity
;
this
.
previousOfSettingActivity
=
activity
;
}
}
/**
* KAGOME Ph2 検品→品質異常報告への遷移
*
* @param operationId
* @param contentId
*/
public
void
abnormalityReport
(
String
operationId
,
String
contentId
)
{
OperationDto
dto
=
new
OperationDto
();
dto
.
operationId
=
Long
.
parseLong
(
operationId
);
dto
.
contentId
=
Long
.
parseLong
(
contentId
);
dto
.
operationType
=
OperationType
.
LIST
;
dto
.
reportType
=
Constant
.
ReportType
.
Report
;
for
(
final
ABVAuthenticatedActivity
activity
:
currentActivityStack
)
{
if
(
activity
instanceof
OperationListActivity
)
{
// 報告一覧の表示
((
OperationListActivity
)
activity
).
startTaskDirectionOrReportView
(
dto
);
// // 報告一覧のWebViewから報告の新規追加処理をキックする
// final ABVAuthenticatedActivity peekActivity = currentActivityStack.peek();
// if (peekActivity instanceof HTMLWebViewActivity) {
// ((HTMLWebViewActivity) peekActivity).addTaskReportFlg = true;
// //((HTMLWebViewActivity) peekActivity).kickAddTaskReport();
// return;
// }
}
}
// // 報告の新規追加が出来なかった場合例外をスロー
// throw new IllegalStateException("transitioning to abnormality report is failed.");
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/HTMLWebViewActivity.java
View file @
bb42b57b
...
@@ -13,25 +13,22 @@ import android.view.Window;
...
@@ -13,25 +13,22 @@ import android.view.Window;
import
android.webkit.JavascriptInterface
;
import
android.webkit.JavascriptInterface
;
import
android.webkit.ValueCallback
;
import
android.webkit.ValueCallback
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebResourceResponse
;
import
android.webkit.WebSettings
;
import
android.webkit.WebSettings
;
import
android.webkit.WebSettings.PluginState
;
import
android.webkit.WebSettings.PluginState
;
import
android.webkit.WebView
;
import
android.webkit.WebView
;
import
android.webkit.WebViewClient
;
import
android.webkit.WebViewClient
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.AdapterView.OnItemClickListener
;
import
android.widget.FrameLayout
;
import
android.widget.ImageButton
;
import
android.widget.ImageButton
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.Toast
;
import
android.widget.Toast
;
import
org.apache.http.HttpResponse
;
import
org.json.adf.JSONObject
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.impl.client.DefaultHttpClient
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.
Date
;
import
java.util.
Map
;
import
jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON
;
import
jp.agentec.abook.abv.bl.acms.client.json.content.ContentJSON
;
import
jp.agentec.abook.abv.bl.acms.type.DownloadStatusType
;
import
jp.agentec.abook.abv.bl.acms.type.DownloadStatusType
;
...
@@ -40,27 +37,19 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
...
@@ -40,27 +37,19 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.Constant
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.bl.data.dao.AbstractDao
;
import
jp.agentec.abook.abv.bl.data.dao.ContentDao
;
import
jp.agentec.abook.abv.bl.download.ContentDownloader
;
import
jp.agentec.abook.abv.bl.download.ContentDownloader
;
import
jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification
;
import
jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification
;
import
jp.agentec.abook.abv.bl.dto.ContentDto
;
import
jp.agentec.abook.abv.bl.logic.AbstractLogic
;
import
jp.agentec.abook.abv.bl.logic.ContractLogic
;
import
jp.agentec.abook.abv.cl.util.ContentLogUtil
;
import
jp.agentec.abook.abv.cl.util.ContentLogUtil
;
import
jp.agentec.abook.abv.cl.util.LocationManagerUtil
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.DefPrefKey
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorCode
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorCode
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorMessage
;
import
jp.agentec.abook.abv.ui.common.constant.ErrorMessage
;
import
jp.agentec.abook.abv.ui.common.util.ABVToastUtil
;
import
jp.agentec.abook.abv.ui.common.util.ABVToastUtil
;
import
jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow
;
import
jp.agentec.abook.abv.ui.common.view.ABVPopupListWindow
;
import
jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper
;
import
jp.agentec.abook.abv.ui.Interface.KeyActionCallback
;
import
jp.agentec.abook.abv.ui.viewer.view.CheckFormWebview
;
//TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約
//TODO: later 遠隔連動関連はContentView,NoPdfViewと共通しているので要集約
public
class
HTMLWebViewActivity
extends
ParentWebViewActivity
{
public
class
HTMLWebViewActivity
extends
ParentWebViewActivity
implements
KeyActionCallback
{
private
static
final
String
TAG
=
"HTMLWebViewActivity"
;
private
static
final
String
TAG
=
"HTMLWebViewActivity"
;
/**
/**
...
@@ -73,7 +62,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
...
@@ -73,7 +62,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
private
ImageButton
downloadButton
;
private
ImageButton
downloadButton
;
private
int
objectLogId
;
private
int
objectLogId
;
private
WebV
iew
webView
;
private
CheckFormWebv
iew
webView
;
private
JsInf
jsInf
=
new
JsInf
();
private
JsInf
jsInf
=
new
JsInf
();
private
ValueCallback
<
Uri
[]>
mUploadMessage
;
private
ValueCallback
<
Uri
[]>
mUploadMessage
;
...
@@ -97,10 +86,13 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
...
@@ -97,10 +86,13 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
final
String
url
=
intent
.
getStringExtra
(
"LINKURL"
);
// LinkURL
final
String
url
=
intent
.
getStringExtra
(
"LINKURL"
);
// LinkURL
mOperationId
=
intent
.
getLongExtra
(
ABookKeys
.
OPERATION_ID
,
-
1
);
// OperationId
mOperationId
=
intent
.
getLongExtra
(
ABookKeys
.
OPERATION_ID
,
-
1
);
// OperationId
// ***** WebViewセット
// ***** WebViewセット
// KAGOME Ph2 WebView上のIMEキーボード入力をハンドリングするため、カスタムWebViewに変更
FrameLayout
frameLayout
=
findViewById
(
R
.
id
.
frameWebView
);
this
.
webView
=
new
CheckFormWebview
(
this
);
frameLayout
.
addView
(
webView
,
new
LinearLayout
.
LayoutParams
(
FP
,
FP
));
this
.
webView
.
setEnterCallback
(
this
);
webView
=
(
WebView
)
findViewById
(
R
.
id
.
webView2
);
webView
.
setVisibility
(
View
.
VISIBLE
);
webView
.
setVisibility
(
View
.
VISIBLE
);
webView
.
setVerticalScrollbarOverlay
(
true
);
// スクロールバー部分の隙間を消す
webView
.
setVerticalScrollbarOverlay
(
true
);
// スクロールバー部分の隙間を消す
if
(
Logger
.
isDebugEnabled
())
{
if
(
Logger
.
isDebugEnabled
())
{
...
@@ -282,6 +274,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
...
@@ -282,6 +274,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
btnWebForward
.
setEnabled
(
false
);
btnWebForward
.
setEnabled
(
false
);
}
}
isPageFinished
=
true
;
isPageFinished
=
true
;
Map
<
String
,
String
>
addTaskReportInitParam
=
getABVUIDataCache
().
ubnormalityReportParam
;
if
(
addTaskReportInitParam
.
size
()
>
0
)
{
kickAddTaskReport
(
addTaskReportInitParam
);
}
}
}
@Override
@Override
...
@@ -664,4 +661,38 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
...
@@ -664,4 +661,38 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
}
}
mUploadMessage
=
null
;
mUploadMessage
=
null
;
}
}
public
void
kickAddTaskReport
(
Map
<
String
,
String
>
addTaskReportInitParam
)
{
// キャッシュからパラメータを受け取りjsの関数に引数として渡す
JSONObject
json
=
new
JSONObject
();
json
.
put
(
ABookKeys
.
UBNORMALITY_REPORT_LOT_NUMBER_7_FIGURE
,
addTaskReportInitParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_LOT_NUMBER_7_FIGURE
));
json
.
put
(
ABookKeys
.
UBNORMALITY_REPORT_ITEM_NO
,
addTaskReportInitParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_ITEM_NO
));
json
.
put
(
ABookKeys
.
UBNORMALITY_REPORT_FARM_NO
,
addTaskReportInitParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_FARM_NO
));
json
.
put
(
ABookKeys
.
UBNORMALITY_REPORT_SHIPPING_SOURCE_NO
,
addTaskReportInitParam
.
get
(
ABookKeys
.
UBNORMALITY_REPORT_SHIPPING_SOURCE_NO
));
final
String
param
=
json
.
toString
();
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
Logger
.
i
(
TAG
,
String
.
format
(
"javascript:CHK_L.addTaskReportWithInitParam('%s')"
,
param
));
webViewLoadUrl
(
String
.
format
(
"javascript:CHK_L.addTaskReportWithInitParam('%s')"
,
param
));
}
});
}
@Override
public
void
keyActionCallback
()
{
doEnterEvent
();
}
@Override
protected
void
doEnterEvent
()
{
webView
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
Logger
.
i
(
TAG
,
"javascript:CHK.notifyMoveForcus()"
);
webViewLoadUrl
(
"javascript:CHK.notifyMoveForcus()"
);
}
});
}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/ParentWebViewActivity.java
View file @
bb42b57b
...
@@ -459,4 +459,22 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
...
@@ -459,4 +459,22 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
public
void
callViewLoadUrl
(
String
url
)
{
public
void
callViewLoadUrl
(
String
url
)
{
webViewLoadUrl
(
url
);
webViewLoadUrl
(
url
);
}
}
@Override
public
boolean
dispatchKeyEvent
(
KeyEvent
event
)
{
if
(
event
.
getAction
()==
KeyEvent
.
ACTION_DOWN
||
event
.
getAction
()==
KeyEvent
.
ACTION_UP
)
{
switch
(
event
.
getKeyCode
())
{
case
KeyEvent
.
KEYCODE_BACK
:
// KAGOME Ph2 WebView表示時に戻るボタンの誤打で報告が消えることがあるため非活性に変更
return
true
;
case
KeyEvent
.
KEYCODE_ENTER
:
// KAGOME Ph2 バーコード読み取り時のEnterキー入力イベントをハンドリング
doEnterEvent
();
break
;
}
}
return
super
.
dispatchKeyEvent
(
event
);
}
protected
void
doEnterEvent
()
{}
}
}
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/view/CheckFormWebview.java
0 → 100644
View file @
bb42b57b
package
jp
.
agentec
.
abook
.
abv
.
ui
.
viewer
.
view
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.view.inputmethod.EditorInfo
;
import
android.view.inputmethod.InputConnection
;
import
android.view.inputmethod.InputConnectionWrapper
;
import
android.webkit.WebView
;
import
jp.agentec.abook.abv.ui.Interface.KeyActionCallback
;
/**
* Created by ogawa-y on 2020/01/21.
*/
public
class
CheckFormWebview
extends
WebView
{
private
KeyActionCallback
enterCallback
;
public
CheckFormWebview
(
Context
context
,
AttributeSet
attrs
,
int
defStyle
)
{
super
(
context
,
attrs
,
defStyle
);
}
public
CheckFormWebview
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
public
CheckFormWebview
(
Context
context
)
{
super
(
context
);
}
public
void
setEnterCallback
(
KeyActionCallback
function
){
this
.
enterCallback
=
function
;
}
@Override
public
InputConnection
onCreateInputConnection
(
EditorInfo
ei
)
{
InputConnection
input
=
super
.
onCreateInputConnection
(
ei
);
if
(
input
==
null
){
return
null
;
}
return
new
MyConnection
(
input
);
}
private
class
MyConnection
extends
InputConnectionWrapper
{
public
MyConnection
(
InputConnection
wrapped
)
{
super
(
wrapped
,
false
);
}
// WebView上でIMEキーボードのアクションがあった場合のハンドリングを行う
@Override
public
boolean
performEditorAction
(
int
action
)
{
if
(
action
==
EditorInfo
.
IME_ACTION_GO
||
action
==
EditorInfo
.
IME_ACTION_NEXT
)
{
if
(
enterCallback
!=
null
)
{
enterCallback
.
keyActionCallback
();
}
}
return
true
;
}
}
}
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