From c807f84b9809c973d0658c9849624a6f0c415dfe Mon Sep 17 00:00:00 2001 From: Eitan Isaacson Date: Tue, 26 Mar 2019 14:53:56 -0700 Subject: [PATCH] Fixes #1186: Made quick actions sheet's handle larger. It now takes up the entire horizontal space and all the vertical space until the buttons. This gives a bigger touch target both for typical users and TalkBack users when they use explore-by-touch. Also changed content description. The content description should not include semantic names like "handle". The screen reader already knows it's a button and describes it as such. Same thing with "sheet". --- .../fenix/quickactionsheet/QuickActionSheet.kt | 3 --- app/src/main/res/drawable/ic_drawer_pull_tab.xml | 15 ++++++++------- .../main/res/layout/layout_quick_action_sheet.xml | 8 +++----- app/src/main/res/values/strings.xml | 2 +- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/quickactionsheet/QuickActionSheet.kt b/app/src/main/java/org/mozilla/fenix/quickactionsheet/QuickActionSheet.kt index b20f9e42b..febf011fb 100644 --- a/app/src/main/java/org/mozilla/fenix/quickactionsheet/QuickActionSheet.kt +++ b/app/src/main/java/org/mozilla/fenix/quickactionsheet/QuickActionSheet.kt @@ -17,7 +17,6 @@ import org.mozilla.fenix.R import android.animation.ValueAnimator import android.view.accessibility.AccessibilityManager import androidx.interpolator.view.animation.FastOutSlowInInterpolator -import org.mozilla.fenix.ext.increaseTapArea import org.mozilla.fenix.utils.Settings class QuickActionSheet @JvmOverloads constructor( @@ -53,7 +52,6 @@ class QuickActionSheet @JvmOverloads constructor( return } - handle.increaseTapArea(grabHandleIncreasedTapArea) handle.setOnClickListener { bounceSheet(quickActionSheetBehavior) } @@ -90,7 +88,6 @@ class QuickActionSheet @JvmOverloads constructor( } companion object { - const val grabHandleIncreasedTapArea = 50 const val demoBounceAnimationLength = 600L const val bounceAnimationLength = 400L const val demoBounceAnimationPeekHeightMultiplier = 4.5f diff --git a/app/src/main/res/drawable/ic_drawer_pull_tab.xml b/app/src/main/res/drawable/ic_drawer_pull_tab.xml index f7f5a04f3..ab9f6d465 100644 --- a/app/src/main/res/drawable/ic_drawer_pull_tab.xml +++ b/app/src/main/res/drawable/ic_drawer_pull_tab.xml @@ -2,10 +2,11 @@ - - - - - + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/layout_quick_action_sheet.xml b/app/src/main/res/layout/layout_quick_action_sheet.xml index 6869f4154..92543c955 100644 --- a/app/src/main/res/layout/layout_quick_action_sheet.xml +++ b/app/src/main/res/layout/layout_quick_action_sheet.xml @@ -14,12 +14,10 @@ Quick action sheet - Quick action sheet handle + Quick actions