Commit 6555a586 by Kim Jinsung

#44660【And】API30対応

parent e3b526ff
...@@ -17,12 +17,12 @@ dependencies { ...@@ -17,12 +17,12 @@ dependencies {
} }
android { android {
compileSdkVersion 29 compileSdkVersion 30
buildToolsVersion '28.0.3' buildToolsVersion '30.0.2'
defaultConfig { defaultConfig {
minSdkVersion 23 minSdkVersion 23
compileSdkVersion 29 targetSdkVersion 30
multiDexEnabled true multiDexEnabled true
// from gradle.properties // from gradle.properties
......
...@@ -6,12 +6,12 @@ buildscript { ...@@ -6,12 +6,12 @@ buildscript {
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
compileSdkVersion 26 compileSdkVersion 30
buildToolsVersion '28.0.3' buildToolsVersion '30.0.2'
defaultConfig { defaultConfig {
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 29 targetSdkVersion 30
//abvEnvironments //abvEnvironments
resValue("string", "acms_address", "${acms_address}") resValue("string", "acms_address", "${acms_address}")
resValue("string", "download_server_address", "${download_server_address}") resValue("string", "download_server_address", "${download_server_address}")
......
...@@ -27,12 +27,12 @@ dependencies { ...@@ -27,12 +27,12 @@ dependencies {
} }
android { android {
compileSdkVersion 26 compileSdkVersion 30
buildToolsVersion '28.0.3' buildToolsVersion '30.0.2'
defaultConfig { defaultConfig {
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 29 targetSdkVersion 30
multiDexEnabled true multiDexEnabled true
} }
sourceSets { sourceSets {
......
package jp.agentec.abook.abv.ui.common.util; package jp.agentec.abook.abv.ui.common.util;
import android.content.Context; import android.content.Context;
import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.view.Gravity; import android.view.Gravity;
import android.widget.Toast; import android.widget.Toast;
...@@ -43,7 +44,10 @@ public class ABVToastUtil { ...@@ -43,7 +44,10 @@ public class ABVToastUtil {
} else { } else {
sToast = Toast.makeText(context.getApplicationContext(), text, duration); sToast = Toast.makeText(context.getApplicationContext(), text, duration);
} }
sToast.setGravity(gravity, 0, 0); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
sToast.setGravity(gravity, 0, 0);
}
sToast.show(); sToast.show();
} }
}); });
......
...@@ -42,6 +42,7 @@ import jp.agentec.adf.util.StringUtil; ...@@ -42,6 +42,7 @@ import jp.agentec.adf.util.StringUtil;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences.Editor; import android.content.SharedPreferences.Editor;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.Gravity; import android.view.Gravity;
import android.view.KeyEvent; import android.view.KeyEvent;
...@@ -692,7 +693,10 @@ public class LoginActivity extends ABVLoginActivity { ...@@ -692,7 +693,10 @@ public class LoginActivity extends ABVLoginActivity {
clickCount++; clickCount++;
if (clickCount >= 10) { if (clickCount >= 10) {
Toast t = Toast.makeText(getApplicationContext(), getResources().getString(R.string.acms_address), Toast.LENGTH_LONG); Toast t = Toast.makeText(getApplicationContext(), getResources().getString(R.string.acms_address), Toast.LENGTH_LONG);
t.setGravity(Gravity.TOP, 0, 0); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
t.setGravity(Gravity.TOP, 0, 0);
}
t.show(); t.show();
clickCount = 0; clickCount = 0;
} }
......
...@@ -138,6 +138,8 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity { ...@@ -138,6 +138,8 @@ public class EnqueteWebViewActivity extends ABVContentViewActivity {
settings.setAppCacheEnabled(false); settings.setAppCacheEnabled(false);
settings.setCacheMode(WebSettings.LOAD_NO_CACHE); settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
// webView.loadDataWithBaseURL("", url2, "text/html", "UTF-8", ""); // webView.loadDataWithBaseURL("", url2, "text/html", "UTF-8", "");
//ターゲットバージョン30以上からデフォルトがfalseに設定されている問題対応
settings.setAllowFileAccess(true);
final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar); final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar);
......
...@@ -128,7 +128,8 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -128,7 +128,8 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
settings.setCacheMode(WebSettings.LOAD_NO_CACHE); settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
// webView.loadDataWithBaseURL("", url2, "text/html", "UTF-8", ""); // webView.loadDataWithBaseURL("", url2, "text/html", "UTF-8", "");
settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応 settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応
//ターゲットバージョン30以上からデフォルトがfalseに設定されている問題対応
settings.setAllowFileAccess(true);
final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar); final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar);
......
...@@ -114,6 +114,8 @@ public class OnlineHTMLWebViewActivity extends ABVContentViewActivity { ...@@ -114,6 +114,8 @@ public class OnlineHTMLWebViewActivity extends ABVContentViewActivity {
settings.setAppCacheEnabled(false); settings.setAppCacheEnabled(false);
settings.setCacheMode(WebSettings.LOAD_NO_CACHE); settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応 settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応
//ターゲットバージョン30以上からデフォルトがfalseに設定されている問題対応
settings.setAllowFileAccess(true);
webView.setWebViewClient(new WebViewClient() { webView.setWebViewClient(new WebViewClient() {
@Override @Override
......
...@@ -35,7 +35,7 @@ public class ActionZoomLayout extends RelativeLayout { ...@@ -35,7 +35,7 @@ public class ActionZoomLayout extends RelativeLayout {
@Override @Override
protected void dispatchDraw(Canvas canvas) { protected void dispatchDraw(Canvas canvas) {
canvas.save(Canvas.ALL_SAVE_FLAG); canvas.save();
canvas.concat(imgMatrix); canvas.concat(imgMatrix);
super.dispatchDraw(canvas); super.dispatchDraw(canvas);
canvas.restore(); canvas.restore();
......
...@@ -133,7 +133,9 @@ public class EnqueteLayout extends RelativeLayout { ...@@ -133,7 +133,9 @@ public class EnqueteLayout extends RelativeLayout {
return false; return false;
} }
}); });
//ターゲットバージョン30以上からデフォルトがfalseに設定されている問題対応
mWebView.getSettings().setAllowFileAccess(true);
mWebView.loadUrl(htmlPath); mWebView.loadUrl(htmlPath);
} }
......
...@@ -96,6 +96,8 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -96,6 +96,8 @@ public class OperationTaskLayout extends RelativeLayout {
settings.setCacheMode(WebSettings.LOAD_NO_CACHE); settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
// mWebView.loadDataWithBaseURL("", url2, "text/html", "UTF-8", ""); // mWebView.loadDataWithBaseURL("", url2, "text/html", "UTF-8", "");
settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応 settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応
//ターゲットバージョン30以上からデフォルトがfalseに設定されている問題対応
settings.setAllowFileAccess(true);
mWebView.loadUrl(linkUrl); mWebView.loadUrl(linkUrl);
......
...@@ -179,7 +179,7 @@ public class ZoomRelativeLayout extends RelativeLayout { ...@@ -179,7 +179,7 @@ public class ZoomRelativeLayout extends RelativeLayout {
@Override @Override
protected void dispatchDraw(Canvas canvas) { protected void dispatchDraw(Canvas canvas) {
canvas.save(Canvas.ALL_SAVE_FLAG); canvas.save();
if (!isOperationPdf) { if (!isOperationPdf) {
canvas.concat(imgMatrix); canvas.concat(imgMatrix);
} }
......
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
android { android {
compileSdkVersion 26 compileSdkVersion 30
buildToolsVersion '28.0.3' buildToolsVersion '30.0.2'
defaultConfig { defaultConfig {
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 29 targetSdkVersion 30
} }
buildTypes { buildTypes {
......
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