On-screen keyboard hides TextEditor


#1

I just came across an interesting problem which probably has a simple solution. At this point you probably now the question anyway, so here it is: TextEditors, or any other component that requires text input, that are near the bottom of the screen are hidden under the keyboard that slides from the bottom of the screen. The problem is that you don't see what you're typing. By the way this often happens with Skype on my Windows Phone mobile but I always considered that to be a bug ;-). I think that common Android application moves the rest of the screen content a bit up, so that you can see the text box. How do you tackle this problem with JUCE applications? Should I somehow move the content component up or is there even some built-in JUCE solution for that?

 

Of course I can design my application so that text input fields are near the top of the screen, but that is kinda limiting...

 

Thanks


#2

I remember having this problem when I was building my app UI with JUCE. I just redesigned my components to allow for the keyboard, as you suggest. You could perhaps also move your component up when the user taps a text editor. I ended up going the native route for mobile UI, which helps to avoid this and other issues I encountered.. 


#3

I ended up going the native route for mobile UI, which helps to avoid this and other issues I encountered.. 

Means what exactly? That you don't use JUCE for your mobile application at all, or that you use native UI along with JUCE for the rest of the functionality?

 

I suppose that moving the component up is the easiest way. Is there some callback that would signal the on-screen keyboard has been shown/hidden? And is there a way to get it's pixel height?


#4

I combine a Juce generated view with native UI for navigation & data entry.

If you dig into the generated Juce Activity java class you should find where the keyboard entry is triggered. Then you can desk with it either in Juce side or Java side.