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
90365be5
Commit
90365be5
authored
Jun 22, 2020
by
yuichiro ogawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#38369 簡易帳票印刷処理の実装(仕掛中)
parent
d75dff25
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
240 additions
and
1 deletions
+240
-1
ABVJE_Launcher_Android/AndroidManifest.xml
+6
-1
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_print_off.png
+0
-0
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_print_on.png
+0
-0
ABVJE_Res_Default_Android/res/drawable/btn_operation_print.xml
+8
-0
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
+13
-0
ABVJE_UI_Android/res/layout-normal/ac_operation_list.xml
+14
-0
ABVJE_UI_Android/res/layout/ac_online_html_webview.xml
+71
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
+27
-0
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/OnlineHTMLWebViewActivity.java
+101
-0
No files found.
ABVJE_Launcher_Android/AndroidManifest.xml
View file @
90365be5
...
...
@@ -213,6 +213,10 @@
<activity
android:name=
"jp.agentec.abook.abv.ui.home.activity.OperationMeetingListActivityDialog"
android:theme=
"@style/Theme.MyTheme.ModalDialog"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity"
android:configChanges=
"orientation|screenSize"
/>
<activity
android:name=
"jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
android:theme=
"@android:style/Theme.NoTitleBar.Fullscreen"
>
</activity>
</application>
</manifest>
\ No newline at end of file
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_print_off.png
0 → 100644
View file @
90365be5
1.11 KB
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_print_on.png
0 → 100644
View file @
90365be5
1.29 KB
ABVJE_Res_Default_Android/res/drawable/btn_operation_print.xml
0 → 100644
View file @
90365be5
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_enabled=
"false"
android:drawable=
"@drawable/home_print_off"
/>
<item
android:drawable=
"@drawable/home_print_on"
/>
</selector>
ABVJE_UI_Android/res/layout-large/ac_operation_list.xml
View file @
90365be5
...
...
@@ -142,6 +142,19 @@
android:gravity=
"center"
>
<ImageButton
android:id=
"@+id/btn_operation_print"
style=
"@style/ToolBarIcon"
android:layout_centerVertical=
"true"
android:src=
"@drawable/btn_operation_print"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center"
>
<ImageButton
android:id=
"@+id/btn_setting"
style=
"@style/ToolBarIcon"
android:onClick=
"onClickSetting"
...
...
ABVJE_UI_Android/res/layout-normal/ac_operation_list.xml
View file @
90365be5
...
...
@@ -143,6 +143,20 @@
android:gravity=
"center"
>
<ImageButton
android:id=
"@+id/btn_operation_print"
style=
"@style/ToolBarIcon"
android:layout_centerVertical=
"true"
android:src=
"@drawable/btn_operation_print"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_weight=
"1"
android:gravity=
"center"
>
<ImageButton
android:id=
"@+id/btn_setting"
style=
"@style/ToolBarIcon"
android:layout_centerVertical=
"true"
...
...
ABVJE_UI_Android/res/layout/ac_online_html_webview.xml
0 → 100644
View file @
90365be5
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/LinearLayout1"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/frameTopbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/app_color"
android:minHeight=
"50dp"
>
<Button
android:id=
"@+id/closeBtn"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"false"
android:layout_alignParentStart=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"5dp"
android:layout_marginStart=
"5dp"
android:background=
"@drawable/btn_close"
android:contentDescription=
"@string/cont_desc"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
>
<TextView
android:id=
"@+id/title"
style=
"@style/DialogToolBarTitle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:maxLines=
"1"
android:ellipsize=
"end"
android:textColor=
"@color/text_dialog"
android:gravity=
"center"
android:visibility=
"gone"
android:textStyle=
"bold"
/>
</LinearLayout>
</RelativeLayout>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<WebView
android:id=
"@+id/webView"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"0dp"
android:layout_marginStart=
"0dp"
/>
<ProgressBar
android:id=
"@+id/refresh_prog"
style=
"?android:attr/progressBarStyleLarge"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center"
android:visibility=
"gone"
/>
</FrameLayout>
</LinearLayout>
\ No newline at end of file
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
View file @
90365be5
...
...
@@ -86,6 +86,7 @@ import jp.agentec.abook.abv.bl.logic.OperationGroupMasterLogic;
import
jp.agentec.abook.abv.bl.logic.OperationLogic
;
import
jp.agentec.abook.abv.cl.util.PreferenceUtil
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity
;
import
jp.agentec.abook.abv.ui.common.activity.ABVUIActivity
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType.OperationLocationType
;
import
jp.agentec.abook.abv.ui.common.appinfo.AppDefType
;
...
...
@@ -125,6 +126,7 @@ public class OperationListActivity extends ABVUIActivity {
private
ImageButton
mCommonContentButton
;
// 共通資料ボタン
private
ImageButton
mOperationBatchSyncButton
;
// カテゴリの一括同期ボタン
private
ImageButton
mCategoryLocationButton
;
// カテゴリ選択ボタン
private
ImageButton
mQuickReportPrintButton
;
// 簡易帳票印刷
private
TextView
mOperationTitle
;
// 一覧のタイトル
...
...
@@ -208,6 +210,7 @@ public class OperationListActivity extends ABVUIActivity {
communicationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_communication_menu
);
mCommonContentButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_common_content
);
mCategoryLocationButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_category_location
);
mQuickReportPrintButton
=
(
ImageButton
)
findViewById
(
R
.
id
.
btn_operation_print
);
// 定期点検で同期ボタンタップの日付と現在の日付が異なる且つ、作業するデータが存在しない場合、needSyncFlgをtrueに更新
updateNeedSyncRoutineOperation
();
...
...
@@ -256,6 +259,14 @@ public class OperationListActivity extends ABVUIActivity {
}
});
// 簡易帳票印刷ボタン
mQuickReportPrintButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
showPrintTargetSelect
();
}
});
// 一括同期ボタン
mOperationBatchSyncButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
...
...
@@ -349,6 +360,22 @@ public class OperationListActivity extends ABVUIActivity {
startActivity
(
intent
,
NaviConsts
.
Right
);
}
// 簡易帳票印刷対象選択画面表示
private
void
showPrintTargetSelect
()
{
if
(!
ABVEnvironment
.
getInstance
().
networkAdapter
.
isNetworkConnected
())
{
showDisConnectNetworkDialog
();
return
;
}
Intent
intent
=
new
Intent
();
//intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
//intent.setClass(this, HTMLXWalkWebViewActivity.class);
//ActivityHandlingHelper.getInstance().startHTMLXWalkWebActivity(this, intent, "https://abook188.abook.bz/acms/ogaway/shop/enqueteSearch/", -1, -1, -1, -1, -1, -1);
intent
.
setClass
(
OperationListActivity
.
this
,
OnlineHTMLWebViewActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_SINGLE_TOP
);
startActivity
(
intent
,
NaviConsts
.
Right
);
}
// ツールバーの設定
private
void
configurationToolbarIcon
()
{
...
...
ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/viewer/activity/OnlineHTMLWebViewActivity.java
0 → 100644
View file @
90365be5
package
jp
.
agentec
.
abook
.
abv
.
ui
.
viewer
.
activity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.Window
;
import
android.webkit.WebSettings
;
import
android.webkit.WebView
;
import
android.webkit.WebViewClient
;
import
android.widget.Button
;
import
jp.agentec.abook.abv.bl.common.constant.ABookKeys
;
import
jp.agentec.abook.abv.bl.common.log.Logger
;
import
jp.agentec.abook.abv.launcher.android.R
;
import
jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity
;
/**
* Created by ogawa-y on 2020/06/22.
*/
public
class
OnlineHTMLWebViewActivity
extends
ABVContentViewActivity
{
private
static
final
String
TAG
=
"OnlineHTMLWebViewActivity"
;
private
WebView
webView
;
private
Button
closeButton
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
Logger
.
i
(
TAG
,
"onCreate"
);
super
.
onCreate
(
savedInstanceState
);
requestWindowFeature
(
Window
.
FEATURE_NO_TITLE
);
// タイトルバー非表示
setContentView
(
R
.
layout
.
ac_online_html_webview
);
// 引継ぎパラメータ
Intent
intent
=
getIntent
();
final
String
url
=
intent
.
getStringExtra
(
"LINKURL"
);
// LinkURL
mOperationId
=
intent
.
getLongExtra
(
ABookKeys
.
OPERATION_ID
,
-
1
);
// OperationId
setWebView
();
webView
.
loadUrl
(
"https://abook188.abook.bz/acms/ogaway/shop/enqueteSearch/"
);
// ***** 戻るボタン
closeButton
=
findViewById
(
R
.
id
.
closeBtn
);
closeButton
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
finishActivity
();
}
});
}
private
void
setWebView
()
{
webView
=
findViewById
(
R
.
id
.
webView
);
webView
.
setVisibility
(
View
.
VISIBLE
);
webView
.
setVerticalScrollbarOverlay
(
true
);
// スクロールバー部分の隙間を消す
if
(
Logger
.
isDebugEnabled
())
{
webView
.
setWebContentsDebuggingEnabled
(
true
);
//デバッグモード(chromeからinspect可)
}
// //ブラウザの描画領域を対象としたイベントをフック
WebSettings
settings
=
webView
.
getSettings
();
settings
.
setSupportMultipleWindows
(
true
);
// 新しいウィンドウを開くイベントを取得する
settings
.
setLoadsImagesAutomatically
(
true
);
// イメージを自動的にロードする
settings
.
setBuiltInZoomControls
(
true
);
// ズーム機能を有効にする
settings
.
setSupportZoom
(
true
);
// ズーム機能を有効にする
settings
.
setJavaScriptEnabled
(
true
);
// JavaScriptを有効にする
settings
.
setLoadWithOverviewMode
(
true
);
// 画面の横幅にページの横幅を合わせる
settings
.
setUseWideViewPort
(
true
);
// 画面の横幅にページの横幅を合わせる
settings
.
setPluginState
(
WebSettings
.
PluginState
.
ON
);
// 「EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.」のエラー対応(あまり効果ない?)
settings
.
setDomStorageEnabled
(
true
);
// WebStorage有効化
settings
.
setAppCacheEnabled
(
false
);
settings
.
setCacheMode
(
WebSettings
.
LOAD_NO_CACHE
);
settings
.
setAllowFileAccessFromFileURLs
(
true
);
//Android7利用で警告ダイヤログ表示問題対応
webView
.
setWebViewClient
(
new
WebViewClient
()
{
@Override
public
boolean
shouldOverrideUrlLoading
(
WebView
view
,
String
url
)
{
Logger
.
v
(
TAG
,
"shouldOverrideUrlLoading: %s"
,
url
);
// if (url.startsWith("abook")) {
// final Uri uri = Uri.parse(url);
// // AndroidOSが5以下のPANO_SERVER処理のため、置き換える必要がある。
// url = "/" + url;
// if (url.contains(ABookKeys.ABOOK_CHECK_API)) {
// commonShouldOverrideUrlLoading(uri, null);
// }
// return true;
// }
return
false
;
}
});
}
@Override
protected
void
finishActivity
()
{
setResult
(
RESULT_OK
,
new
Intent
());
finish
();
}
}
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