diff options
author | Piotr Mikolajczyk <piotr.mikolajczyk@qt.io> | 2020-12-18 10:51:30 +0100 |
---|---|---|
committer | Ville Voutilainen <ville.voutilainen@qt.io> | 2021-03-05 07:57:14 +0000 |
commit | 5c6b10c3cee5737dbc041d0463220898c8120807 (patch) | |
tree | aec06989da84711fa432899f84cd0adba9323e82 /src/plugins/platforms/android/androidjniinput.h | |
parent | 9fb81fc28774cd4aa01a8b29d59150e1a7de8fd8 (diff) |
Android: Place cursor correctly on screen when editing
When editing text the cursor is not placed correctly. So this
has been achieved by tricking Android into thinking that the
input area is only the line where the cursor is, so it is
forced to keep it on screen.
Fixes: QTBUG-91073
Pick-to: 5.15
Change-Id: Icc2e8315deb76ca1a84819d3fdceaa7b027b1174
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/androidjniinput.h')
-rw-r--r-- | src/plugins/platforms/android/androidjniinput.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/androidjniinput.h b/src/plugins/platforms/android/androidjniinput.h index 9e75f43a83..7a93e0214c 100644 --- a/src/plugins/platforms/android/androidjniinput.h +++ b/src/plugins/platforms/android/androidjniinput.h @@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE namespace QtAndroidInput { // Software keyboard support - void showSoftwareKeyboard(int top, int left, int width, int height, int inputHints, int enterKeyType); + void showSoftwareKeyboard(int top, int left, int width, int editorHeight, int height, int inputHints, int enterKeyType); void resetSoftwareKeyboard(); void hideSoftwareKeyboard(); bool isSoftwareKeyboardVisible(); @@ -57,6 +57,8 @@ namespace QtAndroidInput void updateSelection(int selStart, int selEnd, int candidatesStart, int candidatesEnd); // Software keyboard support + // edit field resize + void updateInputItemRectangle(int left, int top, int width, int height); // cursor/selection handles void updateHandles(int handleCount, QPoint editMenuPos = QPoint(), uint32_t editButtons = 0, QPoint cursor = QPoint(), QPoint anchor = QPoint(), bool rtl = false); |