Author Topic: Problem with keyboard and UIInput on Android  (Read 5022 times)

dt1000

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Problem with keyboard and UIInput on Android
« on: December 09, 2014, 08:43:16 PM »
Hi there.
I have a UIInput field in my Android app. It works fine... but if I set the text entry to hidden, the keyboard closes as soon as I press a key. Is there something I am doing wrong? Any suggestions as to a fix would be most welcome!

Thanks in advance,
Dan

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with keyboard and UIInput on Android
« Reply #1 on: December 11, 2014, 08:32:58 AM »
News to me -- which key are you pressing? It should only close if you press outside somewhere. To find out what's hiding it, add a Debug.Log to OnSelect (bool isSelected).

dt1000

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: Problem with keyboard and UIInput on Android
« Reply #2 on: March 16, 2015, 10:22:19 PM »
Hello!
I have finally got round to investigating this...
I've found the code you want me to add a debug message to...
Apologies for being thick, but what exactly should I put in the debug message?

Also, on an iOS device, the keyboard seems to be putting CAPSLOCK on after I hit a key.
Presumably these two phenomena are related...

Thanks once again for your help!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with keyboard and UIInput on Android
« Reply #3 on: March 19, 2015, 06:20:42 AM »
Anything that lets you see where it's coming from. You're looking for a stack trace.

The caps lock happens because iOS tries to capitalize the first letter of every word, and when input is hidden there is only one letter there and the text gets reset every time you press a key. It was basically a hack created to get it to work properly.

My suggestion... don't hide the input field.