Hello Guest

Author Topic: tk2dUITextInput OnTextChange not firing on Android  (Read 5131 times)

zblack

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 22
    • View Profile
tk2dUITextInput OnTextChange not firing on Android
« on: July 21, 2015, 06:54:38 pm »
I found a couple of topics from last year about this not working on iOS, but I'm having the opposite problem. Works fine on desktop (editor) and iOS - not on Android. Any help?

zblack

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: tk2dUITextInput OnTextChange not firing on Android
« Reply #1 on: July 22, 2015, 02:57:45 pm »
I solved this by using the same code that was used for the iOS case (which was already in tk2d):Just removed the UNITY_IOS check so it would also run on Android:

Code: [Select]
#if UNITY_IOS && !UNITY_EDITOR
inputStr = keyboard.text;
if(!inputStr.Equals(text)) {
newText = inputStr;
change = true;
}
#endif

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tk2dUITextInput OnTextChange not firing on Android
« Reply #2 on: July 22, 2015, 05:45:02 pm »
Hi,

What version of tk2d are you using? I vaguely remember fixing this on Android in 2.5x...