Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
Flutter Inappwebview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
Flutter Inappwebview
Commits
944caa9d
Commit
944caa9d
authored
6 years ago
by
YouCii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. Enable setTextZoom function of Android-WebViewSetting
parent
f3f0876f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java
...renzo/flutter_inappbrowser/InAppWebView/InAppWebView.java
+4
-6
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java
...lutter_inappbrowser/InAppWebView/InAppWebViewOptions.java
+2
-0
No files found.
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java
View file @
944caa9d
...
...
@@ -181,12 +181,7 @@ public class InAppWebView extends WebView {
settings
.
setUseWideViewPort
(
options
.
useWideViewPort
);
settings
.
setSupportZoom
(
options
.
supportZoom
);
// fix webview scaling
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
settings
.
setLayoutAlgorithm
(
WebSettings
.
LayoutAlgorithm
.
TEXT_AUTOSIZING
);
else
settings
.
setTextZoom
(
100
);
settings
.
setTextZoom
(
options
.
textZoom
);
}
public
void
loadUrl
(
String
url
,
MethodChannel
.
Result
result
)
{
...
...
@@ -337,6 +332,9 @@ public class InAppWebView extends WebView {
if
(
newOptionsMap
.
get
(
"supportZoom"
)
!=
null
&&
options
.
supportZoom
!=
newOptions
.
supportZoom
)
settings
.
setSupportZoom
(
newOptions
.
supportZoom
);
if
(
newOptionsMap
.
get
(
"textZoom"
)
!=
null
&&
options
.
textZoom
!=
newOptions
.
textZoom
)
settings
.
setTextZoom
(
newOptions
.
textZoom
);
options
=
newOptions
;
}
...
...
This diff is collapsed.
Click to expand it.
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java
View file @
944caa9d
...
...
@@ -21,4 +21,6 @@ public class InAppWebViewOptions extends Options {
public
boolean
domStorageEnabled
=
false
;
public
boolean
useWideViewPort
=
true
;
public
boolean
safeBrowsingEnabled
=
true
;
public
int
textZoom
=
100
;
}
This diff is collapsed.
Click to expand it.
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