Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (keyboard)
Viewing all articles
Browse latest Browse all 352

How to stop Android textField from auto-focusing

$
0
0

Every textField I create focuses automatically when the window opens, forcing the soft keyboard to open. This does not happen on iPhone or iPad, and is the same on the Android emulator, HTC Incredible and HTC Thunderbolt. It has done it across multiple SDK versions (and still exists with 1.8.2).It is the same whether using textField or textArea. This is very annoying and not warranted in most situations I am dealing with.

I am able to temporarily stop it by setting textField.softKeyboardOnFocus = Titanium.UI.Android.SOFT_KEYBOARD_HIDE_ON_FOCUS when the field is created. That turns it off permanently, so after the window finishes loading, I can turn it back on. This is the only decent solution I have found. I have tried a bunch of variations on how the window elements are pieced together, but nothing changes this.

Typically, I will create a window (using url syntax), then in the new window create a scrollable view, and start attaching views, etc to that. The fact that this does not seem to be a widespread problem makes me think there is some setting somewhere that I am missing.

Has anybody solved this without doing kludgy workarounds? Surely this is not by design.


Viewing all articles
Browse latest Browse all 352

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>