From fd20bc2277f98b86bddbd3f8a0ca92457a8c7c70 Mon Sep 17 00:00:00 2001 From: Piotr Mikolajczyk Date: Fri, 20 Nov 2020 15:07:59 +0100 Subject: Android: Qml accessibility fixes - Accessibility focus can follow the position of the widget (for example when swiping on a scrollview) - controls are clickable directly after appearing on the screen after scroll (previously you had to click somewhere else on the screen, and after that you could focus the newly appeared control) - checkbox and switch react correctly on click action - fixed combobox behavior with accessibility enabled Task-number: QTBUG-79611 Pick-to: 6.0 5.15 Change-Id: If36914ab0165f33593e68fd7ecf168693f8538a7 Reviewed-by: Assam Boudjelthia --- .../jar/src/org/qtproject/qt/android/QtNative.java | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/android/jar/src/org/qtproject/qt/android/QtNative.java') diff --git a/src/android/jar/src/org/qtproject/qt/android/QtNative.java b/src/android/jar/src/org/qtproject/qt/android/QtNative.java index bd11b255f5..001e6a7970 100644 --- a/src/android/jar/src/org/qtproject/qt/android/QtNative.java +++ b/src/android/jar/src/org/qtproject/qt/android/QtNative.java @@ -934,6 +934,42 @@ public class QtNative }); } + private static void notifyAccessibilityLocationChange() + { + runAction(new Runnable() { + @Override + public void run() { + if (m_activityDelegate != null) { + m_activityDelegate.notifyAccessibilityLocationChange(); + } + } + }); + } + + private static void notifyObjectHide(final int viewId) + { + runAction(new Runnable() { + @Override + public void run() { + if (m_activityDelegate != null) { + m_activityDelegate.notifyObjectHide(viewId); + } + } + }); + } + + private static void notifyObjectFocus(final int viewId) + { + runAction(new Runnable() { + @Override + public void run() { + if (m_activityDelegate != null) { + m_activityDelegate.notifyObjectFocus(viewId); + } + } + }); + } + private static void registerClipboardManager() { if (m_service == null || m_activity != null) { // Avoid freezing if only service -- cgit v1.2.3