Commit b2b48d1c by Yujin Seo

Merge branch 'feature/contract/sato/1.0.300_51420' into 'contract/sato/1.0.300_dev'

ダッシュボードの追加

See merge request !260
parents ec27fafb fe19586a
......@@ -32,7 +32,7 @@ public class TaskReportDto extends AbstractDto {
public String sendBackUserId; // 差し戻しユーザId 差し戻された場合のみ
public String sendBackUserName; // 差し戻しユーザ名 差し戻された場合のみ
public String sendBackComment; // 確認コメント 差し戻された場合のみ
public String taskStatus; // 状況 0:未実施、1:作業中、999:作業完了
public int taskStatus; // 状況 0:未実施、1:作業中、999:作業完了
public int reportStatus;
@Override
......
<?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/ic_dashboard_off"/>
<item
android:drawable="@drawable/ic_dashboard_on"/>
</selector>
<vector android:height="30dp" android:viewportHeight="90"
android:viewportWidth="90" android:width="30dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#333333" android:pathData="M40.9,49.2H8.8V13h32.1V49.2zM40.9,57.1H8.8v19.8h32.1V57.1zM81.1,13H49v20.2h32.1V13zM81.2,41H49.1v36h32.1L81.2,41L81.2,41z"/>
</vector>
<vector android:height="30dp" android:viewportHeight="90"
android:viewportWidth="90" android:width="30dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#A5A5A5" android:pathData="M40.9,49.2H8.8V13h32.1V49.2zM40.9,57.1H8.8v19.8h32.1V57.1zM81.1,13H49v20.2h32.1V13zM81.2,41H49.1v36h32.1L81.2,41L81.2,41z"/>
</vector>
......@@ -1454,4 +1454,6 @@
<string name="msg_error_open_ozd_content">OZフォームで作成されているため、表示することができません。</string>
<!-- API31対応後 -->
<string name="msg_permission_dialog_bluetooth">Bluetooth利用権限が必要です。\nアプリ設定画面へ遷移します。</string>
<string name="dashboard">ダッシュボード</string>
</resources>
......@@ -1462,4 +1462,6 @@
<string name="msg_error_open_ozd_content">OZ 서식으로 작성되었으므로 표시할 수 없습니다.</string>
<!-- API31対応後 -->
<string name="msg_permission_dialog_bluetooth">Bluetooth 이용권한이 필요합니다. \n앱설정화면으로 이동합니다.</string>
<string name="dashboard">계기반</string>
</resources>
\ No newline at end of file
......@@ -1460,4 +1460,6 @@
<string name="msg_error_open_ozd_content">Since it is created with an OZ form, it cannot be displayed.</string>
<!-- API31対応後 -->
<string name="msg_permission_dialog_bluetooth">Bluetooth usage authority is required. \n To transition to the application setting screen.</string>
<string name="dashboard">Dashboard</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="jp.agentec.abook.abv.launcher.android"
xmlns:tools="http://schemas.android.com/tools"
package="jp.agentec.abook.abv.launcher.android"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk tools:overrideLibrary="org.xwalk.core"/>
<uses-sdk tools:overrideLibrary="org.xwalk.core" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</manifest>
<application>
<activity android:name="jp.agentec.abook.abv.ui.home.activity.DashboardActivity"></activity>
</application>
</manifest>
\ No newline at end of file
buildscript {
repositories {
jcenter()
}
repositories {
jcenter()
}
}
apply plugin: 'com.android.library'
......@@ -29,23 +29,23 @@ android {
compileSdkVersion 31
buildToolsVersion '30.0.2'
defaultConfig {
minSdkVersion 23
targetSdkVersion 31
multiDexEnabled true
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['res']
aidl.srcDirs = ['src']
res.srcDirs = ['res']
defaultConfig {
minSdkVersion 23
targetSdkVersion 31
multiDexEnabled true
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['res']
aidl.srcDirs = ['src']
res.srcDirs = ['res']
jniLibs.srcDirs = ['libs', 'xwalk_core_library/src/main/jniLibs']
jniLibs.srcDirs = ['libs', 'xwalk_core_library/src/main/jniLibs']
}
}
}
lintOptions {
quiet true
checkReleaseBuilds false
......
<vector android:height="30dp" android:viewportHeight="90"
android:viewportWidth="90" android:width="30dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M15.1,10.3h21.5c2.6,0 4.8,2.1 4.8,4.8v21.5c0,2.6 -2.1,4.8 -4.8,4.8c-2.6,0 -4.8,-2.1 -4.8,-4.8v-9.5c-5.9,4.5 -9.5,11.5 -9.5,19.1c0,13.2 10.7,23.9 23.9,23.9s23.9,-10.7 23.9,-23.9c0,-5.2 -1.6,-10.2 -4.8,-14.3c-1.6,-2.1 -1.2,-5.1 1,-6.7c2.1,-1.6 5.1,-1.2 6.7,1c4.4,5.8 6.7,12.8 6.7,20c0,18.4 -15,33.4 -33.4,33.4s-33.4,-15 -33.4,-33.4c0,-10.3 4.9,-20 12.9,-26.3H15.1c-2.6,0 -4.8,-2.1 -4.8,-4.8S12.5,10.3 15.1,10.3z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="jp.agentec.abook.abv.ui.home.activity.DashboardActivity">
<RelativeLayout
android:id="@+id/frameTopbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/app_color"
android:minHeight="50dp" >
<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:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:gravity="center"
android:text="@string/dashboard"
android:textStyle="bold"
tools:ignore="RelativeOverlap" />
<LinearLayout
android:id="@+id/menuLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="5dp" >
<ImageButton
android:id="@+id/btn_reload"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_reload"
android:layout_marginTop="6dp"
android:layout_marginEnd="10dp"
/>
<ImageButton
android:id="@+id/btn_help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_operation_help"
android:layout_marginTop="6dp"
android:layout_marginEnd="10dp"
/>
</LinearLayout>
</RelativeLayout>
<FrameLayout
android:id="@+id/frameWebView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical" >
</FrameLayout>
<include layout="@layout/operation_common_toolbar" android:id="@+id/toolbar2"/>
</LinearLayout>
......@@ -10,6 +10,20 @@
android:minHeight="50dp"
android:visibility="visible">
<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_operation_dashboard"
style="@style/ToolBarIcon"
android:src="@drawable/btn_operation_dashboard" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
package jp.agentec.abook.abv.ui.home.activity;
import android.annotation.SuppressLint;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.viewer.view.CheckFormWebview;
public class DashboardActivity extends OperationActivity {
private static final String TAG = "DashboardActivity";
private WebView webView;
private String url = "https://abook188-1.abook.bz/acms/asp/login/";
private ProgressBar progress;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac_operation_dashboard);
createCommonToolber();
ImageButton reloadButton = findViewById(R.id.btn_reload);
reloadButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Logger.d(TAG, "ReloadUrl");
webView.loadUrl(url + "&reload=true");
}
});
progress = findViewById(R.id.refresh_prog);
createWebView();
FrameLayout frameLayout = findViewById(R.id.frameWebView);
frameLayout.addView(webView, new LinearLayout.LayoutParams(FP, FP));
// 読み込み
webView.loadUrl(url);
}
@Override
protected void onStop() {
super.onStop();
if (webView != null) {
webView.stopLoading();
}
}
@Override
protected void createCommonToolber() {
super.createCommonToolber();
mDashboardButton.setEnabled(false);
}
private void createWebView() {
webView = new CheckFormWebview(this, new CheckFormWebview.KeyActionCallback() {
@Override
public void keyActionCallback(int editorInfoAction) {
if (editorInfoAction == EditorInfo.IME_ACTION_GO || editorInfoAction == EditorInfo.IME_ACTION_NEXT) {
// キーボードの次ボタン検知
runOnUiThread(new Runnable() {
@Override
public void run() {
Logger.i(TAG, "javascript:CHK.notifyMoveForcus()");
webView.loadUrl("javascript:CHK.notifyMoveForcus()");
}
});
}
}
});
webView.setVisibility(View.VISIBLE);
if (Logger.isDebugEnabled()) {
WebView.setWebContentsDebuggingEnabled(true); //デバッグモード(chromeからinspect可)
}
initSettings(webView.getSettings());
webView.setWebChromeClient(new ChromeClient());
webView.setWebViewClient(new WebViewClient());
// webView.addJavascriptInterface(jsInf, "android");
Logger.d(TAG, "loadUrl: " + url);
}
@SuppressLint("SetJavaScriptEnabled")
private void initSettings(WebSettings settings) {
settings.setSupportMultipleWindows(true); // 新しいウィンドウを開くイベントを取得する
settings.setLoadsImagesAutomatically(true); // イメージを自動的にロードする
settings.setBuiltInZoomControls(true); // ズーム機能を有効にする
settings.setSupportZoom(true); // ズーム機能を有効にする
settings.setJavaScriptEnabled(true); // JavaScriptを有効にする
settings.setLoadWithOverviewMode(true); // 画面の横幅にページの横幅を合わせる
settings.setUseWideViewPort(true); // 画面の横幅にページの横幅を合わせる
//noinspection deprecation(API18から非推奨になった。無視)
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利用で警告ダイヤログ表示問題対応
//ターゲットバージョン30以上からデフォルトがfalseに設定されている問題対応
settings.setAllowFileAccess(true);
}
private class ChromeClient extends WebChromeClient {
@Override
public void onProgressChanged(WebView view, int newProgress) {
if (progress != null) {
progress.setVisibility(View.VISIBLE);
if (newProgress >= 100) {
progress.setVisibility(View.GONE);
}
}
}
@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback,
FileChooserParams fileChooserParams) {
Logger.i(TAG, "oepnFile acceptType : %s", fileChooserParams.getAcceptTypes()[0]);
return false;
}
}
// private class JsInf {
//
// @JavascriptInterface
// public void existSetLocation(String ret) {
// Logger.d(TAG, "existSetLocation=%s", ret);
// if (ret != null && ret.equals("true")) { // setLocationメソッドが存在する場合、ページ読み込み完了とみなす
// isPageFinished = true;
// } else { // 存在しない場合、ページ読み込み未完了とみなし1秒後に再度呼出しを繰り返す
// handler.postDelayed(new Runnable() {
// @Override
// public void run() {
// callExistsSetLocation();
// }
// }, 1000);
// }
// }
//
// @JavascriptInterface
// public void existSendLog(String ret) {
// Logger.d(TAG, "existSendLog=%s", ret);
// if (ret != null && ret.equals("true")) {
// runOnUiThread(new Runnable() { // sendLogメソッドが存在する場合、呼び出す
// @Override
// public void run() {
// try {
// webView.loadUrl("javascript:sendLog()");
// } catch (Exception e) {
// Logger.e(TAG, "javascript:sendLog error. " + e.toString());
// }
// }
// });
// } else {
// finishActivity();
// }
// }
//
// @JavascriptInterface
// public void getAttachedDataUrl(String taskKey, String data) {
// commonAttachedDataUrl(taskKey, data);
// }
// }
}
......@@ -25,8 +25,10 @@ import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity;
public class OperationActivity extends ABVUIActivity {
@SuppressWarnings("unused")
private static final String TAG = "OperationActivity";
protected ImageButton mOperationHomeButton; // ホームボタン
protected ImageButton mDashboardButton; // ダッシュボード
protected ImageButton mCommonContentButton; // 関連資料
protected ImageButton mCommunicationButton; // コミュニケーション
protected ImageButton mQuickReportPrintButton; // 簡易帳票印刷ボタン
......@@ -36,10 +38,26 @@ public class OperationActivity extends ABVUIActivity {
protected void createCommonToolber() {
// ホームボタン
mOperationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
mOperationHomeButton = findViewById(R.id.btn_operation_home);
mOperationHomeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
backHome();
}
});
// ダッシュボード
mDashboardButton = findViewById(R.id.btn_operation_dashboard);
mDashboardButton.setEnabled(true);
mDashboardButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showDashboard();
}
});
// 共通資料
mCommonContentButton = (ImageButton) findViewById(R.id.btn_common_content);
mCommonContentButton = findViewById(R.id.btn_common_content);
mCommonContentButton.setEnabled(true);
mCommonContentButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -49,7 +67,7 @@ public class OperationActivity extends ABVUIActivity {
});
// コミュニケーション
mCommunicationButton = (ImageButton) findViewById(R.id.btn_communication_menu);
mCommunicationButton = findViewById(R.id.btn_communication_menu);
List<PushMessageDto> pushMessageDtoList = mPushMessageLogic.getAllPushMessageList();
boolean existUnreadFlg = false;
for (PushMessageDto pushMessageDto : pushMessageDtoList) {
......@@ -71,7 +89,7 @@ public class OperationActivity extends ABVUIActivity {
});
// 簡易帳票印刷ボタン
mQuickReportPrintButton = (ImageButton) findViewById(R.id.btn_operation_print);
mQuickReportPrintButton = findViewById(R.id.btn_operation_print);
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
mQuickReportPrintButton.setOnClickListener(new View.OnClickListener() {
@Override
......@@ -86,10 +104,23 @@ public class OperationActivity extends ABVUIActivity {
}
}
private void backHome() {
Intent intent = new Intent();
intent.setClass(this, OperationListActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
startActivity(intent);
}
// ダッシュボード表示
private void showDashboard() {
Intent intent = new Intent();
intent.setClass(this, DashboardActivity.class);
startActivity(intent);
}
// 共通資料画面表示
private void showCommonContent() {
Intent intent = new Intent();
intent.setClass(OperationActivity.this, OperationRelatedContentActivity.class);
intent.setClass(this, OperationRelatedContentActivity.class);
startActivity(intent);
}
/**
......@@ -102,7 +133,7 @@ public class OperationActivity extends ABVUIActivity {
mCommunicationMenuDialog.setContentView(R.layout.communication_menu_dialog);
List<PushMessageDto> pushMessageDtoList = mPushMessageLogic.getAllPushMessageList();
LinearLayout ll_menuItem_meeting = (LinearLayout)mCommunicationMenuDialog.findViewById(R.id.ll_item_meeting);
LinearLayout ll_menuItem_meeting = mCommunicationMenuDialog.findViewById(R.id.ll_item_meeting);
ll_menuItem_meeting.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
......
......@@ -291,12 +291,12 @@ public class OperationRelatedContentActivity extends OperationActivity {
*/
private void setOnButtonEvent() {
// プロジェクトホーム画面へ
mOperationHomeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
// mOperationHomeButton.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// finish();
// }
// });
// 一括保存
mAllSaveButton.setOnClickListener(new View.OnClickListener() {
......
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