Commit 4ae9c18a by yuichiro ogawa

#38369 WebView表示処理の実装

parent 90365be5
......@@ -156,6 +156,8 @@ public class AcmsApis {
public static final String ApiOperationGroupMaster = "operationGroupMaster";
// 絞り検索マスタデータ取得
public static final String ApiGetApertureMasterData = "getApertureMasterData";
// 簡易帳票一覧取得
public static final String ApiQuickReportSearch = "quickReportSearch";
// download
/**
......@@ -200,7 +202,7 @@ public class AcmsApis {
} else if (methodName.equals(ApiOperationList) || methodName.equals(ApiWorkingGroupList) || methodName.equals(ApiSendTaskData) || methodName.equals(ApiGetOperationData) ||
methodName.equals(ApiGetTaskFile) || methodName.equals(ApiSceneEntry) || methodName.equals(ApiTaskContentEntry) ||
methodName.equals(ApiSendPushMessage) || methodName.equals(ApiGetPushMessages) || methodName.equals(ApiSendRoutineTaskData) ||
methodName.equals(ApiOperationGroupMaster) || methodName.equals(ApiGetApertureMasterData)) {
methodName.equals(ApiOperationGroupMaster) || methodName.equals(ApiGetApertureMasterData) || methodName.equals(ApiQuickReportSearch)) {
apiValue = Constant.ApiValue.checkapi;
}
......
package jp.agentec.abook.abv.bl.logic;
public class OnlineHTMLWebViewLogic extends AbstractLogic {
private static final String TAG = "OnlineHTMLWebViewLogic";
public byte[] getPostData() {
String data = "sid=" + cache.getMemberInfo().sid;
return data.getBytes();
}
}
......@@ -533,6 +533,9 @@
<string name="title_category">カテゴリ</string>
<string name="title_all_operation">全作業</string>
<!-- ABookCheck 1.2.3 -->
<string name="title_quick_report_output">簡易帳票出力</string>
<!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0-->
<string name="meetingroom_setting_1">会議室設定(1)</string>
......
......@@ -535,6 +535,9 @@
<string name="title_category">분류</string>
<string name="title_all_operation">전체 작업</string>
<!-- ABookCheck 1.2.3 -->
<string name="title_quick_report_output">簡易帳票出力</string>
<!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0-->
<string name="meetingroom_setting_1">회의실 설정(1)</string>
......
......@@ -539,6 +539,9 @@
<string name="title_category">Category</string>
<string name="title_all_operation">All</string>
<!-- ABookCheck 1.2.3 -->
<string name="title_quick_report_output">簡易帳票出力</string>
<!-- 1.0.1 Resource Pattern 1 -->
<!-- 1.9.0.0-->
<string name="meetingroom_setting_1">Meeting room setting(1)</string>
......
......@@ -34,12 +34,12 @@
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" />
android:maxLines="1"
android:textColor="@color/text_dialog"
android:textStyle="bold"
android:visibility="visible" />
</LinearLayout>
</RelativeLayout>
......
......@@ -53,6 +53,7 @@ import java.util.Stack;
import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
import jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetOperationDataParameters;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
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;
......@@ -367,12 +368,9 @@ public class OperationListActivity extends ABVUIActivity {
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);
intent.putExtra("LINKURL", AcmsApis.getApiUrl(ABVEnvironment.getInstance().acmsAddress, ABVDataCache.getInstance().getUrlPath(), AcmsApis.ApiQuickReportSearch));
startActivity(intent, NaviConsts.Right);
}
......
......@@ -8,9 +8,11 @@ import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.TextView;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OnlineHTMLWebViewLogic;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
......@@ -18,7 +20,7 @@ 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 static final String TAG = "OnlineHTMLWebView";
private WebView webView;
private Button closeButton;
......@@ -30,14 +32,17 @@ public class OnlineHTMLWebViewActivity extends ABVContentViewActivity {
requestWindowFeature(Window.FEATURE_NO_TITLE); // タイトルバー非表示
setContentView(R.layout.ac_online_html_webview);
TextView title = findViewById(R.id.title);
title.setText(R.string.title_quick_report_output);
// 引継ぎパラメータ
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/");
OnlineHTMLWebViewLogic logic = AbstractLogic.getLogic(OnlineHTMLWebViewLogic.class);
webView.postUrl(url, logic.getPostData());
// ***** 戻るボタン
closeButton = findViewById(R.id.closeBtn);
......@@ -73,23 +78,11 @@ public class OnlineHTMLWebViewActivity extends ABVContentViewActivity {
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;
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment