mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-03 18:37:40 +00:00
Provide the correct state of the on-screen keyboard to the API (patch from Sylvain)
This commit is contained in:
parent
6ee661398d
commit
e54eede265
4 changed files with 60 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue