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
ef8d0d1f
Commit
ef8d0d1f
authored
Nov 25, 2019
by
Lorenzo Pichilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #190 keyboard not showing on the second or more created webviews
parent
ec47b191
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
206 additions
and
1203 deletions
+206
-1203
.idea/workspace.xml
.idea/workspace.xml
+126
-211
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/FlutterWebView.java
.../pichillilorenzo/flutter_inappbrowser/FlutterWebView.java
+3
-5
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/FlutterWebViewFactory.java
...lilorenzo/flutter_inappbrowser/FlutterWebViewFactory.java
+1
-1
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java
...renzo/flutter_inappbrowser/InAppWebView/InAppWebView.java
+2
-2
example/lib/in_app_webiew_example.screen.dart
example/lib/in_app_webiew_example.screen.dart
+69
-506
example/lib/test.dart
example/lib/test.dart
+0
-473
lib/src/in_app_webview.dart
lib/src/in_app_webview.dart
+5
-5
No files found.
.idea/workspace.xml
View file @
ef8d0d1f
This diff is collapsed.
Click to expand it.
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/FlutterWebView.java
View file @
ef8d0d1f
...
...
@@ -36,14 +36,12 @@ public class FlutterWebView implements PlatformView, MethodCallHandler {
public
final
MethodChannel
channel
;
public
final
Registrar
registrar
;
public
FlutterWebView
(
Registrar
registrar
,
int
id
,
HashMap
<
String
,
Object
>
params
,
View
containerView
)
{
public
FlutterWebView
(
Registrar
registrar
,
final
Context
context
,
int
id
,
HashMap
<
String
,
Object
>
params
,
View
containerView
)
{
this
.
registrar
=
registrar
;
this
.
activity
=
registrar
.
activity
();
DisplayListenerProxy
displayListenerProxy
=
new
DisplayListenerProxy
();
DisplayManager
displayManager
=
(
DisplayManager
)
this
.
registrar
.
context
().
getSystemService
(
Context
.
DISPLAY_SERVICE
);
DisplayManager
displayManager
=
(
DisplayManager
)
context
.
getSystemService
(
Context
.
DISPLAY_SERVICE
);
displayListenerProxy
.
onPreWebViewInitialization
(
displayManager
);
String
initialUrl
=
(
String
)
params
.
get
(
"initialUrl"
);
...
...
@@ -55,7 +53,7 @@ public class FlutterWebView implements PlatformView, MethodCallHandler {
InAppWebViewOptions
options
=
new
InAppWebViewOptions
();
options
.
parse
(
initialOptions
);
webView
=
new
InAppWebView
(
registrar
,
this
,
id
,
options
,
containerView
);
webView
=
new
InAppWebView
(
registrar
,
context
,
this
,
id
,
options
,
containerView
);
displayListenerProxy
.
onPostWebViewInitialization
(
displayManager
);
webView
.
prepare
();
...
...
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/FlutterWebViewFactory.java
View file @
ef8d0d1f
...
...
@@ -23,7 +23,7 @@ public class FlutterWebViewFactory extends PlatformViewFactory {
@Override
public
PlatformView
create
(
Context
context
,
int
id
,
Object
args
)
{
HashMap
<
String
,
Object
>
params
=
(
HashMap
<
String
,
Object
>)
args
;
return
new
FlutterWebView
(
registrar
,
id
,
params
,
containerView
);
return
new
FlutterWebView
(
registrar
,
context
,
id
,
params
,
containerView
);
}
}
android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebView.java
View file @
ef8d0d1f
...
...
@@ -508,8 +508,8 @@ final public class InAppWebView extends InputAwareWebView {
super
(
context
,
attrs
,
defaultStyle
);
}
public
InAppWebView
(
PluginRegistry
.
Registrar
registrar
,
Object
obj
,
int
id
,
InAppWebViewOptions
options
,
View
containerView
)
{
super
(
registrar
.
activeContext
()
,
containerView
);
public
InAppWebView
(
PluginRegistry
.
Registrar
registrar
,
Context
context
,
Object
obj
,
int
id
,
InAppWebViewOptions
options
,
View
containerView
)
{
super
(
context
,
containerView
);
this
.
registrar
=
registrar
;
if
(
obj
instanceof
InAppBrowserActivity
)
this
.
inAppBrowserActivity
=
(
InAppBrowserActivity
)
obj
;
...
...
example/lib/in_app_webiew_example.screen.dart
View file @
ef8d0d1f
This diff is collapsed.
Click to expand it.
example/lib/test.dart
deleted
100644 → 0
View file @
ec47b191
This diff is collapsed.
Click to expand it.
lib/src/in_app_webview.dart
View file @
ef8d0d1f
...
...
@@ -1284,7 +1284,7 @@ class InAppWebViewController {
///This should not be called if Safe Browsing has been disabled by manifest tag
///or [AndroidInAppWebViewOptions.safeBrowsingEnabled]. This prepares resources used for Safe Browsing.
///
///**NOTE**: available on
ly for Android
.
///**NOTE**: available on
Android 27+
.
Future
<
bool
>
startSafeBrowsing
()
async
{
Map
<
String
,
dynamic
>
args
=
<
String
,
dynamic
>{};
if
(
_inAppBrowserUuid
!=
null
&&
_inAppBrowser
!=
null
)
{
...
...
@@ -1308,7 +1308,7 @@ class InAppWebViewController {
///
///[hosts] represents the list of hosts. This value must never be null.
///
///**NOTE**: available on
ly for Android
.
///**NOTE**: available on
Android 27+
.
Future
<
bool
>
setSafeBrowsingWhitelist
({
@required
List
<
String
>
hosts
})
async
{
assert
(
hosts
!=
null
);
Map
<
String
,
dynamic
>
args
=
<
String
,
dynamic
>{};
...
...
@@ -1322,7 +1322,7 @@ class InAppWebViewController {
///Returns a URL pointing to the privacy policy for Safe Browsing reporting. This value will never be `null`.
///
///**NOTE**: available on
ly for Android
.
///**NOTE**: available on
Android 27+
.
Future
<
String
>
getSafeBrowsingPrivacyPolicyUrl
()
async
{
Map
<
String
,
dynamic
>
args
=
<
String
,
dynamic
>{};
if
(
_inAppBrowserUuid
!=
null
&&
_inAppBrowser
!=
null
)
{
...
...
@@ -1344,7 +1344,7 @@ class InAppWebViewController {
///Clears the SSL preferences table stored in response to proceeding with SSL certificate errors.
///
///**NOTE**: available only
for
Android.
///**NOTE**: available only
on
Android.
Future
<
void
>
clearSslPreferences
()
async
{
Map
<
String
,
dynamic
>
args
=
<
String
,
dynamic
>{};
if
(
_inAppBrowserUuid
!=
null
&&
_inAppBrowser
!=
null
)
{
...
...
@@ -1360,7 +1360,7 @@ class InAppWebViewController {
///
///**NOTE**: On iOS certificate-based credentials are never stored permanently.
///
///**NOTE**: available on
ly for Android
.
///**NOTE**: available on
Android 21+
.
Future
<
void
>
clearClientCertPreferences
()
async
{
Map
<
String
,
dynamic
>
args
=
<
String
,
dynamic
>{};
if
(
_inAppBrowserUuid
!=
null
&&
_inAppBrowser
!=
null
)
{
...
...
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