Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
42ec861c
Commit
42ec861c
authored
Dec 19, 2017
by
Mark Sherman
Committed by
Evan W. Patton
Dec 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress error on HideKeyboard (#1061)
Fixes #1059
parent
4e0dfe24
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
appinventor/components/src/com/google/appinventor/components/runtime/Form.java
...s/src/com/google/appinventor/components/runtime/Form.java
+4
-5
No files found.
appinventor/components/src/com/google/appinventor/components/runtime/Form.java
View file @
42ec861c
...
@@ -2212,12 +2212,11 @@ public class Form extends AppCompatActivity
...
@@ -2212,12 +2212,11 @@ public class Form extends AppCompatActivity
@SimpleFunction
(
description
=
"Hide the onscreen soft keyboard."
)
@SimpleFunction
(
description
=
"Hide the onscreen soft keyboard."
)
public
void
HideKeyboard
()
{
public
void
HideKeyboard
()
{
View
view
=
this
.
getCurrentFocus
();
View
view
=
this
.
getCurrentFocus
();
if
(
view
!=
null
)
{
if
(
view
==
null
)
{
view
=
frameLayout
;
}
InputMethodManager
imm
=
(
InputMethodManager
)
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
InputMethodManager
imm
=
(
InputMethodManager
)
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
imm
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
0
);
imm
.
hideSoftInputFromWindow
(
view
.
getWindowToken
(),
0
);
}
else
{
dispatchErrorOccurredEvent
(
this
,
"HideKeyboard"
,
ErrorMessages
.
ERROR_NO_FOCUSABLE_VIEW_FOUND
);
}
}
}
protected
boolean
isRepl
()
{
protected
boolean
isRepl
()
{
...
...
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