Page 1 of 1

Get SoftInput Keyboard Height Android

Posted: Sun Jul 31, 2016 4:12 pm
by LunaRebirth
Hello,
I'm trying to get the height of the Android keyboard that appears on-screen so I can move textboxes up into the screen's view.

Looking through the android_tools.cpp code for setSoftInputVisibility, I see jclass classView = jni->FindClass("android/view/View"); and jmethodID mid_getDecorView = jni->GetMethodID(classWindow, "getDecorView", "()Landroid/view/View;");
which I assume are pieces of something I need to determine the height.

Just wanted to see if anyone knew of a way to get their keyboard height :-)
Thanks

Re: Get SoftInput Keyboard Height Android

Posted: Sun Jul 31, 2016 10:20 pm
by CuteAlien
Sorry, don't know. But I also couldn't figure out the problem you run into last time with the soft-keyboard failing on newer Android when in landscape mode. I've looked into that a lot, but in the end gave up because like it looks like it's a problem in the Java-code (my guess is that inputmethodservice/SoftInputWindow.java dispatchTouchEvent is running into an invalid bounds-check). And google doesn't officially support mixing native code and their Java SDK. Which means - there isn't really an offiical way to use the Android keyboard with native code. I've decided to go completely with self-coded custom keyboards in the future unless Google starts caring about NDK developers more some day.

Re: Get SoftInput Keyboard Height Android

Posted: Mon Aug 01, 2016 5:19 am
by LunaRebirth
The strange issue with my keyboard from an earlier post is fine and working again. Google seems to be updating the keyboard, though I can't speak for all Android phone devices.

Hmm okay.
Do you have any recommendations on what I should look online for making a custom keyboard?

Re: Get SoftInput Keyboard Height Android

Posted: Mon Aug 01, 2016 9:51 am
by CuteAlien
Well, basically a keyboard is a gui-dialog with a bunch of buttons. Buttons can send key-events to Irrlicht.
That's pretty much it :-) (get's more complicated with international keyboards when you need different layouts...)

Re: Get SoftInput Keyboard Height Android

Posted: Mon Aug 01, 2016 3:20 pm
by LunaRebirth
Ah okay that makes sense.
I just want it to look like the actual Android keyboard but I can make that happen, I'm sure. Thanks!