diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2015-12-05 13:23:26 +0100 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2015-12-07 16:56:25 +0000 |
commit | 420b4dbece04f8015cad24a49622c65c540f0a22 (patch) | |
tree | 39a5832ef95a2f24a1275e683b492c5f8d5744ac /src/plugins/platforms/android/androidjniinput.h | |
parent | 7908da98f01c24bd95a9e7a7f938de697a6a02b6 (diff) |
Android: Implement QInputMethod::keyboardRectangle
We can use getWindowVisibleDisplayFrame to know the height on the
keyboard, and we can use getLocationOnScreen to find out how much
the view is scrolled. Since onPreDraw is always called when the
view is scrolled or when the keyboard appears or disapear, we can
call the native functions from there.
This is not working for floating keyboards.
[ChangeLog][Android] Implemented QInputMethod::keyboardRectangle
Task-number: QTBUG-40731
Change-Id: I7848eb34fece410b29a06bf0bbb2313112fffa68
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/plugins/platforms/android/androidjniinput.h')
-rw-r--r-- | src/plugins/platforms/android/androidjniinput.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/androidjniinput.h b/src/plugins/platforms/android/androidjniinput.h index d737dc9c98..7132d1fc4e 100644 --- a/src/plugins/platforms/android/androidjniinput.h +++ b/src/plugins/platforms/android/androidjniinput.h @@ -35,6 +35,7 @@ #define ANDROIDJNIINPUT_H #include <jni.h> #include <QtCore/qglobal.h> +#include <QtCore/QRect> QT_BEGIN_NAMESPACE @@ -45,6 +46,7 @@ namespace QtAndroidInput void resetSoftwareKeyboard(); void hideSoftwareKeyboard(); bool isSoftwareKeyboardVisible(); + QRect softwareKeyboardRect(); void updateSelection(int selStart, int selEnd, int candidatesStart, int candidatesEnd); // Software keyboard support |