Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: hexaust on August 28, 2014, 05:49:51 AM
-
I am trying to create something similar to an instant messaging app. Right now I have several problems that I don't know how to handle
- Detecting mobile keyboard height and presence (Not sure if I need that)
- Align elements that are at the bottom of the screen on the top of the keyboard when is open (with the help of step 1?, my UI is anchored)
- Keep mobile keyboard open when submitting a message. (still have no ideea how to do that, I checked UIInput.cs but nothing works for me)
I am attaching an example to visualize the case that I'm talking about. (Left is good, right is bad)
Thank you!
(http://i.imgur.com/GOu3RSE.png)
-
You must handle this things by yourself, something like:
Detect when some Input Label, have focus, and then, move everything on your screen up.
I don't thing there is a automatically way of doing that.
-
You must handle this things by yourself, something like:
Detect when some Input Label, have focus, and then, move everything on your screen up.
I don't thing there is a automatically way of doing that.
I am trying to do that, but how far should I move things up? How do I get the keyboard size or the new screen height or whatever it takes to get the amount of movement needed for things to show up right above the keyboard?
-
Probably you will need to get this from internet, and put as const on your code. I don't know if exist a way of getting that from Unity
-
I don't think that's gonna work, Android has a dozen of screen sizes. Unity has a way to get the portion of the screen which is covered by the keyboard. But unfortunately it only works for iOS, on Android it returns zero-Rect.
http://docs.unity3d.com/ScriptReference/TouchScreenKeyboard-area.html (http://docs.unity3d.com/ScriptReference/TouchScreenKeyboard-area.html)