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
c15ee021
Commit
c15ee021
authored
Nov 08, 2019
by
crazecoder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add initialScale in android
parent
e18e6910
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java
...renzo/flutter_inappbrowser/InAppWebView/InAppWebView.java
+6
-0
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java
...lutter_inappbrowser/InAppWebView/InAppWebViewOptions.java
+1
-0
lib/src/webview_options.dart
lib/src/webview_options.dart
+4
-1
No files found.
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java
View file @
c15ee021
...
...
@@ -216,6 +216,9 @@ final public class InAppWebView extends InputAwareWebView {
settings
.
setLoadsImagesAutomatically
(
options
.
loadsImagesAutomatically
);
settings
.
setMinimumFontSize
(
options
.
minimumFontSize
);
settings
.
setMinimumLogicalFontSize
(
options
.
minimumLogicalFontSize
);
if
(
options
.
initialScale
!=
null
)
setInitialScale
(
options
.
initialScale
);
settings
.
setNeedInitialFocus
(
options
.
needInitialFocus
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
settings
.
setOffscreenPreRaster
(
options
.
offscreenPreRaster
);
...
...
@@ -529,6 +532,9 @@ final public class InAppWebView extends InputAwareWebView {
if
(
newOptionsMap
.
get
(
"minimumLogicalFontSize"
)
!=
null
&&
!
options
.
minimumLogicalFontSize
.
equals
(
newOptions
.
minimumLogicalFontSize
))
settings
.
setMinimumLogicalFontSize
(
newOptions
.
minimumLogicalFontSize
);
if
(
newOptionsMap
.
get
(
"initialScale"
)
!=
null
&&
!
options
.
initialScale
.
equals
(
newOptions
.
initialScale
))
setInitialScale
(
newOptions
.
initialScale
);
if
(
newOptionsMap
.
get
(
"needInitialFocus"
)
!=
null
&&
options
.
needInitialFocus
!=
newOptions
.
needInitialFocus
)
settings
.
setNeedInitialFocus
(
newOptions
.
needInitialFocus
);
...
...
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewOptions.java
View file @
c15ee021
...
...
@@ -62,6 +62,7 @@ public class InAppWebViewOptions extends Options {
public
boolean
loadWithOverviewMode
=
true
;
public
boolean
loadsImagesAutomatically
=
true
;
public
Integer
minimumLogicalFontSize
=
8
;
public
Integer
initialScale
;
public
boolean
needInitialFocus
=
true
;
public
boolean
offscreenPreRaster
=
false
;
public
String
sansSerifFontFamily
=
"sans-serif"
;
...
...
lib/src/webview_options.dart
View file @
c15ee021
...
...
@@ -156,6 +156,7 @@ class AndroidInAppWebViewOptions implements WebViewOptions, BrowserOptions, Andr
bool
loadWithOverviewMode
;
bool
loadsImagesAutomatically
;
int
minimumLogicalFontSize
;
int
initialScale
;
bool
needInitialFocus
;
bool
offscreenPreRaster
;
String
sansSerifFontFamily
;
...
...
@@ -169,7 +170,7 @@ class AndroidInAppWebViewOptions implements WebViewOptions, BrowserOptions, Andr
this
.
cursiveFontFamily
=
"cursive"
,
this
.
defaultFixedFontSize
=
16
,
this
.
defaultFontSize
=
16
,
this
.
defaultTextEncodingName
=
"UTF-8"
,
this
.
disabledActionModeMenuItems
,
this
.
fantasyFontFamily
=
"fantasy"
,
this
.
fixedFontFamily
=
"monospace"
,
this
.
forceDark
=
AndroidInAppWebViewForceDark
.
FORCE_DARK_OFF
,
this
.
geolocationEnabled
=
true
,
this
.
layoutAlgorithm
,
this
.
loadWithOverviewMode
=
true
,
this
.
loadsImagesAutomatically
=
true
,
this
.
minimumLogicalFontSize
=
8
,
this
.
needInitialFocus
=
true
,
this
.
offscreenPreRaster
=
false
,
this
.
sansSerifFontFamily
=
"sans-serif"
,
this
.
serifFontFamily
=
"sans-serif"
,
this
.
minimumLogicalFontSize
=
8
,
this
.
initialScale
,
this
.
needInitialFocus
=
true
,
this
.
offscreenPreRaster
=
false
,
this
.
sansSerifFontFamily
=
"sans-serif"
,
this
.
serifFontFamily
=
"sans-serif"
,
this
.
standardFontFamily
=
"sans-serif"
});
...
...
@@ -208,6 +209,7 @@ class AndroidInAppWebViewOptions implements WebViewOptions, BrowserOptions, Andr
"loadWithOverviewMode"
:
loadWithOverviewMode
,
"loadsImagesAutomatically"
:
loadsImagesAutomatically
,
"minimumLogicalFontSize"
:
minimumLogicalFontSize
,
"initialScale"
:
initialScale
,
"needInitialFocus"
:
needInitialFocus
,
"offscreenPreRaster"
:
offscreenPreRaster
,
"sansSerifFontFamily"
:
sansSerifFontFamily
,
...
...
@@ -251,6 +253,7 @@ class AndroidInAppWebViewOptions implements WebViewOptions, BrowserOptions, Andr
options
.
loadWithOverviewMode
=
map
[
"loadWithOverviewMode"
];
options
.
loadsImagesAutomatically
=
map
[
"loadsImagesAutomatically"
];
options
.
minimumLogicalFontSize
=
map
[
"minimumLogicalFontSize"
];
options
.
initialScale
=
map
[
"initialScale"
];
options
.
needInitialFocus
=
map
[
"needInitialFocus"
];
options
.
offscreenPreRaster
=
map
[
"offscreenPreRaster"
];
options
.
sansSerifFontFamily
=
map
[
"sansSerifFontFamily"
];
...
...
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