This site permanently moved to
https://droidscript.github.io
. Please update links accordingly.
You are being forwarded automatically in 3...
[stay here]
Back
HideKeyboard
Hello World
Hides the device keyboard if it is currently shown.
app.HideKeyboard()
See Also:
ShowKeyboard
,
SetOnShowKeyboard
Example - Toggle Keyboard
click to expand contents
function
OnStart
(
)
{
lay
=
app
.
CreateLayout
(
"linear"
,
"VCenter,FillXY"
)
;
tgl
=
app
.
CreateToggle
(
"Keyboard"
,
0.3
,
0.1
)
;
tgl
.
SetOnTouch
(
tgl_OnTouch
)
;
lay
.
AddChild
(
tgl
)
;
edt
=
app
.
CreateTextEdit
(
"Text"
,
.8
,
.1
)
;
edt
.
Focus
(
)
;
lay
.
AddChild
(
edt
)
;
app
.
AddLayout
(
lay
)
;
}
function
tgl_OnTouch
(
show
)
{
if
(
show
)
app
.
ShowKeyboard
(
edt
)
;
else
app
.
HideKeyboard
(
)
;
}
Copy
Copy All
Run
loading