- Home /
Input Field not working on a Samsung
Hi,
I'm testing my game in different platforms. I tried it on the webplayer, some iOS and two Android. It work fine in all platforms but not in the Samsung Galaxy tab 3. It's a bit weird because it does in a Nexus 5 with 5.1. The problem is that when I write a text or a password it works while I'm typing but the text disappear when I finish and I hide the keyboard. I'm concerned because I don't know in how many devices will work my game. Is there someone with the same problem? Do you know how can be fixed?
Samsung Galaxy Tab 3 7" Android 4.4.2 Kernel 3.4.5
I'm working with unity 4.6.4
Answer by nate-sewell · Apr 19, 2015 at 12:31 PM
We came up with a working solution to the disappearing input text the code is based on the InputField source code from 4.6.1 as this was the most recent posted version when we started working on the second issue, since the Keyboard was a private variable we were no longer able to simply derive from the InputField base class. (please, don't bother complain that we didn't follow that approach as it was not a viable option anymore)
We have tested our modifications in Unity 4.6.2 (the first 2 modifications) and Unity 5.0.1f (all three modifications) on the devices which Brian listed in the previous post
Our modification includes a couple of other "features":
optional start value for the associated text field, with the additional option to reset the initial value when the field is empty and deselected.
the keyboard is no longer static (shared among all input fields) so you don't get cross contamination among input fields any more.
when you click off of the input field the text remains (or if appropriate resets to the start value if left blank)
Most of the work for modification 3 is done in the LateUpdate method, tracking what the value should have been, and a minor addition in OnDeselect to set the value to value back to what was entered
I suppose we can post a diff based patch from the 4.6.1 source if there is any interest...
I found a similar solution in this post: http://forum.unity3d.com/threads/inputfield-bugs.318739/#post-2069083 It's works for me so I'll check your answer like correct.
Answer by brianthegreat90 · Apr 16, 2015 at 07:17 PM
I have also encountered this problem, although I am running in Unity 5.0.1f1. I do not know the solution, but I have tested it on every device I could get my hands on.
I found that Input fields are working on: - Nexus 9 (Android 5.0.1, Kernel 3.10.40) - HTC One M7 (Android 5.0.2, Kernel 3.4.10) - Samsung Note 4 (Android 5.0.1, 3.10.40) - iPad Mini 2 (iOS 8.3) - iPhone 5S (iOS 8.2) - iPhone 6 (iOS 8.3)
They are not working on: - Samsung Galaxy Tab 10.1 (Android 4.4.2, Kernel 3.4.0) - Samsung Galaxy S4 (Android 4.4.2, Kernel 3.4.0) - Samsung Tab Pro 8.4 (Android 4.4.2, Kernel 3.4.0)