Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: hexaust on August 28, 2014, 05:49:51 AM

Title: Mobile keyboard questions
Post 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

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)
Title: Re: Mobile keyboard questions
Post by: badawe on August 28, 2014, 06:57:17 AM
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.
Title: Re: Mobile keyboard questions
Post by: hexaust on August 28, 2014, 07:01:29 AM
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?
Title: Re: Mobile keyboard questions
Post by: badawe on August 28, 2014, 11:25:47 AM
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
Title: Re: Mobile keyboard questions
Post by: hexaust on August 29, 2014, 06:27:44 AM
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)