Provide the correct state of the on-screen keyboard to the API (patch from Sylvain)

This commit is contained in:
Sam Lantinga 2017-08-13 21:05:15 -07:00
parent 6ee661398d
commit e54eede265
4 changed files with 60 additions and 1 deletions

View file

@ -1684,6 +1684,20 @@ void Android_JNI_HideTextInput(void)
Android_JNI_SendMessage(COMMAND_TEXTEDIT_HIDE, 0);
}
SDL_bool Android_JNI_IsScreenKeyboardShown()
{
jmethodID mid;
jboolean is_shown = 0;
JNIEnv *mEnv = Android_JNI_GetEnv();
mid = (*mEnv)->GetStaticMethodID(mEnv, mActivityClass,"isScreenKeyboardShown","()Z");
if (mid) {
is_shown = (*mEnv)->CallStaticBooleanMethod(mEnv, mActivityClass, mid);
}
return is_shown;
}
int Android_JNI_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
{
JNIEnv *env;