Author Topic: UIInput problem in Android  (Read 2108 times)

Thales Velasco

  • Guest
UIInput problem in Android
« on: October 29, 2013, 08:45:46 AM »
I've been using Ngui for a while now. Recently I'm having a problem with the UIInput, and need some help.

I have 2 UIInputs at my Scene, same Anchor and Panel. When I Play it at the Unity Editor, i works as usual, but when I 'Buid and Run' it at my Android device, I select the UIInput, and the virtual keyboard apears, I enter the text and it goes to both of the Inputs on the Scene. If I select the second, It already has the text, and if I delete it, the first input text is deleted too. I tryed to put one in another anchor, and panel, but it continue the same. I even added a third UIInput, to check if this happens because one was a copy of the other, but it has been linked also, and the same text apears.

I have used UIInput this very same way in the past, with the previous version of Ngui, but I've never had this problem before, it seems to be a new version problem.
Hope you can help me.
Tnx in advance;
« Last Edit: October 29, 2013, 09:40:19 AM by Thales Velasco »

jnbt

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: UIInput problem in Android
« Reply #1 on: October 29, 2013, 10:36:25 AM »
Same problem here on iOS. Every input's value is changes when entering stuff with the "virtual" keyboard.

jnbt

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: UIInput problem in Android
« Reply #2 on: October 29, 2013, 10:55:09 AM »
Just found the problem in UIInput.cs, Line 139.

To solve this issue change:

  1. static protected TouchScreenKeyboard mKeyboard;
  2.  
to
  1. protected TouchScreenKeyboard mKeyboard;
  2.  

I think this is a regression bug, as before 3.0.3 mKeyboard also wasn't static

Thales Velasco

  • Guest
Re: UIInput problem in Android
« Reply #3 on: October 29, 2013, 11:22:14 AM »
Worked here! Thank you very much!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIInput problem in Android
« Reply #4 on: October 29, 2013, 04:24:33 PM »
There was a missing "isSelected" check in one place, but it should be all there in 3.0.3e, so removing the static flag shouldn't be necessary. Only one keyboard can be up at a time, so I see no reason to not have it be static.