- Home /
Cannot Hide Android keyboard when inputfield activated
I have made a custom keyboard with unity. But when I add character to Inputfield by clicking my custom keyboard, android keyboard(samsung) pops up. Is there any way to hide it?
Answer by goutham12 · Jan 09, 2020 at 06:37 AM
why do you want to take input field when you have custom key board. take a button in place of input field and enable your key board when it is pressed. change child text.
Ah, I forgot to mention that I'm using Inputfield because I need to use text cursor.
actually you can hide the android keyboard by the below lines
var keyboard = TouchScreen$$anonymous$$eyboard.Open("", TouchScreen$$anonymous$$eyboardType.Default, false, false, false);
keyboard.active = false;
for referece https://docs.unity3d.com/ScriptReference/TouchScreen$$anonymous$$eyboard-active.html
It works, but the cancels the focus. Do you know any way to keep the focus on while hiding the keyboard?
Your answer
Follow this Question
Related Questions
How to call a function when mobile keyboard is "done"? 2 Answers
How to disable TouchScreenKeyboard for InputField? 0 Answers
Keep InputField focus / selected when clicking a button / touch screen /UI 4.6 2 Answers
Make android number pad keyboard visible for TMPro_InputField 0 Answers
[tvOS] UI.InputField doesn't show touchscreenKeyboard automatically 1 Answer