diff options
author | BogDan Vatra <bogdan@kdab.com> | 2018-01-09 12:54:22 +0200 |
---|---|---|
committer | BogDan Vatra <bogdan@kdab.com> | 2018-04-15 18:00:34 +0000 |
commit | 8379186009bc9d0a9ef6309c7508fd529b7eec12 (patch) | |
tree | 3245df0ac359c23ce532e21859d24d7a373595e7 /src/plugins/platforms/android/androidjniinput.cpp | |
parent | ba2221bd7314c42353cd7ab2895c043d06d837ac (diff) |
Android: rewrite edit context menu
- get rid of the old tool bar with edit controls which was also dropped
by Google after they realized that is not intuitive at all.
- we now introduce a nice context menu as we see in modern Android
devices. This menu works on all Android devices starting with API 16.
[ChangeLog][Android] Say hello to Android edit context menu
Change-Id: I00d0d83fe8876335c72d7b183db4c1b53746d6b7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/androidjniinput.cpp')
-rw-r--r-- | src/plugins/platforms/android/androidjniinput.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/platforms/android/androidjniinput.cpp b/src/plugins/platforms/android/androidjniinput.cpp index c4142a9b6e..a714a56338 100644 --- a/src/plugins/platforms/android/androidjniinput.cpp +++ b/src/plugins/platforms/android/androidjniinput.cpp @@ -124,11 +124,12 @@ namespace QtAndroidInput return m_softwareKeyboardRect; } - void updateHandles(int mode, QPoint cursor, QPoint anchor, bool rtl) + void updateHandles(int mode, QPoint editMenuPos, uint32_t editButtons, QPoint cursor, QPoint anchor, bool rtl) { - QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "updateHandles", "(IIIIIZ)V", - mode, cursor.x(), cursor.y(), anchor.x(), - anchor.y(), rtl); + QJNIObjectPrivate::callStaticMethod<void>(applicationClass(), "updateHandles", "(IIIIIIIIZ)V", + mode, editMenuPos.x(), editMenuPos.y(), editButtons, + cursor.x(), cursor.y(), + anchor.x(), anchor.y(), rtl); } static void mouseDown(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y) |