Search code examples
androidtitaniumappceleratorappcelerator-mobiletitanium-mobile

Titanium Textfield on TableView not getting focused


I am having few text fields inside the table view, while clicking on the text fields it is not getting focused(in Android platform). I have seen some questions regarding the same issue, but those suggestions not worked for me. I am using Titanium 1.7.5, Android 2.2


Solution

  • I had the same issue, and some steps you should keep in mind:

    • Don't add a focus event to the field, this will overwrite the build-in one
    • Add the event singletap and fire the focus event on that field

    mytextfield.addEventListener('singletap',function(){ mytextfield.focus(); });

    This should do the trick, at least, it did for me.