Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-android
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4e6ad246
authored
May 13, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改滚动条
1 parent
e52e272f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
app/src/main/java/com/polysoft/nafmii/webview/X5WebviewUtils.java
app/src/main/java/com/polysoft/nafmii/webview/X5WebviewUtils.java
View file @
4e6ad24
...
@@ -8,6 +8,7 @@ import android.view.ViewGroup;
...
@@ -8,6 +8,7 @@ import android.view.ViewGroup;
import
com.polysoft.nafmii.BuildConfig
;
import
com.polysoft.nafmii.BuildConfig
;
import
com.tencent.smtt.export.external.extension.interfaces.IX5WebSettingsExtension
;
import
com.tencent.smtt.export.external.extension.interfaces.IX5WebSettingsExtension
;
import
com.tencent.smtt.export.external.extension.interfaces.IX5WebViewExtension
;
import
com.tencent.smtt.sdk.WebSettings
;
import
com.tencent.smtt.sdk.WebSettings
;
import
com.tencent.smtt.sdk.WebView
;
import
com.tencent.smtt.sdk.WebView
;
...
@@ -23,6 +24,9 @@ public class X5WebviewUtils {
...
@@ -23,6 +24,9 @@ public class X5WebviewUtils {
webView
.
setLayerType
(
View
.
LAYER_TYPE_HARDWARE
,
null
);
webView
.
setLayerType
(
View
.
LAYER_TYPE_HARDWARE
,
null
);
// webView.clearCache(true);
// webView.clearCache(true);
webView
.
setWebContentsDebuggingEnabled
(
BuildConfig
.
DEBUG
);
webView
.
setWebContentsDebuggingEnabled
(
BuildConfig
.
DEBUG
);
webView
.
setHorizontalScrollBarEnabled
(
false
);
//水平不显示
webView
.
setVerticalScrollBarEnabled
(
false
);
//垂直不显示
webView
.
setScrollBarSize
(
0
);
setWebView
(
webView
);
setWebView
(
webView
);
return
webView
;
return
webView
;
}
}
...
@@ -85,6 +89,12 @@ public class X5WebviewUtils {
...
@@ -85,6 +89,12 @@ public class X5WebviewUtils {
extension
.
setPicModel
(
IX5WebSettingsExtension
.
PicModel_NORMAL
);
extension
.
setPicModel
(
IX5WebSettingsExtension
.
PicModel_NORMAL
);
}
}
IX5WebViewExtension
x5Extension
=
webView
.
getX5WebViewExtension
();
if
(
null
!=
x5Extension
)
{
//竖直快速滑块,设置null可去除
x5Extension
.
setVerticalTrackDrawable
(
null
);
}
}
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment