Can't hide soft keyboard using Titanium SDK - Android

84 views Asked by At

I have an action bar that contains a Titanium searchView. Currently the searchView receives focus when the page loads and the soft keyboard is shown.

I need the soft keyboard to not be shown by default so that list data beneath it is viewable.

I have tried setting the windowSoftKeyboard property to hidden on the window as well as the searchView. I've also tried using the blur method in various event listeners to hide the keyboard however nothing seems to work.

This is straight forward to do natively using Java so I feel there should be a straightforward way to do this using Titanium.

1

There are 1 answers

0
Hemant Solanki On

You can try below statements one by one.

First Solution: Define below window property in either XML or TSS

"windowSoftKeyboard":Titanium.UI.Android.SOFT_INPUT_ADJUST_PAN

Second solution: This should write on window onOpen or onFocus listener

Titanium.UI.Android.hideSoftKeyboard();