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
2ae07055
Commit
2ae07055
authored
Dec 11, 2019
by
Lorenzo Pichilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix name dropDownWorkaroundEnabled
parent
e4625d5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebView/InAppWebView.java
...renzo/flutter_inappwebview/InAppWebView/InAppWebView.java
+3
-4
android/src/main/java/com/pichillilorenzo/flutter_inappwebview/JavaScriptBridgeInterface.java
...renzo/flutter_inappwebview/JavaScriptBridgeInterface.java
+2
-2
No files found.
android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebView/InAppWebView.java
View file @
2ae07055
...
...
@@ -567,7 +567,7 @@ final public class InAppWebView extends InputAwareWebView {
" });"
+
" }"
+
" var isMultiple = !!this.flutterInAppWebViewSelect.multiple;"
+
" window."
+
JavaScriptBridgeInterface
.
name
+
".callHandler('flutterInAppWebViewDropDownWorkaroud', getIndexSelectValues(this.flutterInAppWebViewSelect), isMultiple, options).then(function(result) {"
+
" window."
+
JavaScriptBridgeInterface
.
name
+
".callHandler('flutterInAppWebViewDropDownWorkarou
n
d', getIndexSelectValues(this.flutterInAppWebViewSelect), isMultiple, options).then(function(result) {"
+
" if (result != null && result.values != null) {"
+
" if (!isMultiple) {"
+
" if (result.values.length > 0) {"
+
...
...
@@ -1470,7 +1470,7 @@ final public class InAppWebView extends InputAwareWebView {
new
PrintAttributes
.
Builder
().
build
());
}
public
void
showDropDownWorkarou
d
(
final
List
<
Integer
>
selectedValues
,
final
List
<
List
<
String
>>
values
,
final
boolean
isMultiSelect
,
final
DropDownWorkarou
dCallback
callback
)
{
public
void
showDropDownWorkarou
nd
(
final
List
<
Integer
>
selectedValues
,
final
List
<
List
<
String
>>
values
,
final
boolean
isMultiSelect
,
final
DropDownWorkaroun
dCallback
callback
)
{
FrameLayout
layout
=
new
FrameLayout
(
getContext
());
final
List
<
String
>
listViewValues
=
new
ArrayList
<
String
>();
...
...
@@ -1495,7 +1495,6 @@ final public class InAppWebView extends InputAwareWebView {
String
value
=
values
.
get
(
position
).
get
(
1
);
if
(!
isMultiSelect
)
{
result
.
add
(
value
);
//callback.result(result);
alertDialog
.
dismiss
();
}
else
{
if
(!
result
.
contains
(
value
))
{
...
...
@@ -1530,7 +1529,7 @@ final public class InAppWebView extends InputAwareWebView {
alertDialog
.
show
();
}
public
static
class
DropDownWorkaroudCallback
{
public
static
class
DropDownWorkarou
n
dCallback
{
public
void
result
(
List
<
String
>
value
)
{
}
...
...
android/src/main/java/com/pichillilorenzo/flutter_inappwebview/JavaScriptBridgeInterface.java
View file @
2ae07055
...
...
@@ -274,7 +274,7 @@ public class JavaScriptBridgeInterface {
public
void
run
()
{
// workaround for https://github.com/pichillilorenzo/flutter_inappwebview/issues/182
if
(
handlerName
.
equals
(
"flutterInAppWebViewDropDownWorkaroud"
))
{
if
(
handlerName
.
equals
(
"flutterInAppWebViewDropDownWorkarou
n
d"
))
{
try
{
JSONArray
jsonArray
=
new
JSONArray
(
args
);
...
...
@@ -301,7 +301,7 @@ public class JavaScriptBridgeInterface {
values
.
add
(
value
);
}
webView
.
showDropDownWorkarou
d
(
selectedValues
,
values
,
isMultiSelect
,
new
InAppWebView
.
DropDownWorkarou
dCallback
()
{
webView
.
showDropDownWorkarou
nd
(
selectedValues
,
values
,
isMultiSelect
,
new
InAppWebView
.
DropDownWorkaroun
dCallback
()
{
@Override
public
void
result
(
List
<
String
>
values
)
{
String
value
=
"{values: "
+
(
new
JSONArray
(
values
))
+
"}"
;
...
...
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