From 7630d396a64d9297029d1ccd8185751fbd12ed91 Mon Sep 17 00:00:00 2001 From: Yuhan Yang Date: Tue, 4 Feb 2025 07:33:49 +0000 Subject: [PATCH] Add Autoclick cursor area size settings dialog Replace Autoclick sliderbar with an alert dialog and radio group to match the new UI requirement. Screenshot: - Click area column: go/screenshot-5AfdF7FGghsdiXk - Alert dialog: go/screenshot-4dgtojcc6lvjtyy Bug: 390460480 Test: ToggleAutoclickCustomSeekbarControllerTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: Ic79f8833e69dde8d8eb3e945e5acd551d2ee9ff5 --- .../dialog_autoclick_cursor_area_size.xml | 78 ++++++++++ res/values/strings.xml | 27 +++- res/values/styles.xml | 8 + res/xml/accessibility_autoclick_settings.xml | 9 +- ...ggleAutoclickCursorAreaSizeController.java | 102 ++++++++----- ...AutoclickCursorAreaSizeControllerTest.java | 137 +++++++----------- 6 files changed, 226 insertions(+), 135 deletions(-) create mode 100644 res/layout/dialog_autoclick_cursor_area_size.xml diff --git a/res/layout/dialog_autoclick_cursor_area_size.xml b/res/layout/dialog_autoclick_cursor_area_size.xml new file mode 100644 index 00000000000..8f517bae29f --- /dev/null +++ b/res/layout/dialog_autoclick_cursor_area_size.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 483eb130658..d8a71b1455d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -5621,12 +5621,27 @@ Longer Auto click time - - - Cursor area size - - - Adjust the autoclick ring indicator area size + + + Click area + + + The area where the cursor can move freely without canceling the click once the countdown starts + + + Extra large + + + Large + + + Default + + + Small + + + Extra small Ignore minor cursor movement diff --git a/res/values/styles.xml b/res/values/styles.xml index 29b4aa65739..3bc436829ce 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -710,6 +710,14 @@ 14sp + +