- Home /
How to keep opening of keyboard when focus transferred to another input field by programmatically.?
,Hi, I am working on OTP section. For this, I have 6 input fields and one submit button. And also, I have written script for auto focus by following code.
number1.onValueChanged.AddListener((text) =>
{
number2.Select();
number2.ActivateInputField();
});
But, these lines did not work. I tried various possible solutions. But, the keyboard reopen when other inputfield get activated. I have also tested with StartCoroutine() to delay the selecting and activating input field.
number1.onValueChanged.AddListener((text) =>
{
//number1.DeactivateInputField();
StartCoroutine(SelectInputField(number2));
});
IEnumerator SelectInputField(TMP_InputField inputField)
{
yield return new WaitForSeconds(0.5f);
inputField.ActivateInputField();
}
Please suggest any possible solution / trick to keep opening of keyboard when focus transferred to another inputfield.
Your answer
Follow this Question
Related Questions
Unity app losses focus when Android keyboard is active through InputField 2 Answers
How to stop mobile keyboard from showing? 0 Answers
Holotoolkit on screen keyboard won't open,Hololens on-screen keyboard won't open 1 Answer
[Android] Keyboard doesn't show immediately when selecting inputfield as S Pan. 1 Answer
Input Field problem (Unity 4.6 UI) on LG G3 Android device 1 Answer