From 7daaaad74a29eca0e2a56b29fe55e2f615b05415 Mon Sep 17 00:00:00 2001 From: Matthew Ng Date: Thu, 9 Aug 2018 13:55:05 -0700 Subject: [PATCH] Reduce NearestTouchFrame size to prevent button taps on nav bar The NearestTouchFrame spanned the entire nav bar that took any tap to hit the nearest button such as the back button. Reducing it prevents taps from the edge of the nav bar. Related: ag/4179853 Change-Id: I25a73cc995ed8d479ca9d5da85ec8a7cb629769d Fixes: 112298917 Test: tap the left side of the nav bar (cherry picked from commit 9e90f24dc5dc2574700c46288617bea18b28bf29) --- .../SystemUI/res/layout/navigation_layout.xml | 12 +++++------ .../res/layout/navigation_layout_rot90.xml | 20 +++++++++---------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/packages/SystemUI/res/layout/navigation_layout.xml b/packages/SystemUI/res/layout/navigation_layout.xml index baaf699c278ad..d72021e27e0bc 100644 --- a/packages/SystemUI/res/layout/navigation_layout.xml +++ b/packages/SystemUI/res/layout/navigation_layout.xml @@ -18,14 +18,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:layout_marginStart="@dimen/rounded_corner_content_padding" + android:layout_marginEnd="@dimen/rounded_corner_content_padding" + android:paddingStart="@dimen/nav_content_padding" + android:paddingEnd="@dimen/nav_content_padding"> @@ -34,8 +36,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" - android:paddingStart="@dimen/nav_content_padding" - android:paddingEnd="@dimen/nav_content_padding" android:clipToPadding="false" android:clipChildren="false" /> @@ -46,8 +46,6 @@ android:layout_gravity="center" android:gravity="center" android:orientation="horizontal" - android:paddingStart="@dimen/nav_content_padding" - android:paddingEnd="@dimen/nav_content_padding" android:clipToPadding="false" android:clipChildren="false" /> diff --git a/packages/SystemUI/res/layout/navigation_layout_rot90.xml b/packages/SystemUI/res/layout/navigation_layout_rot90.xml index 6d5b77885a09d..24a0c71f3bada 100644 --- a/packages/SystemUI/res/layout/navigation_layout_rot90.xml +++ b/packages/SystemUI/res/layout/navigation_layout_rot90.xml @@ -18,14 +18,16 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:layout_marginTop="@dimen/rounded_corner_content_padding" + android:layout_marginBottom="@dimen/rounded_corner_content_padding" + android:paddingTop="@dimen/nav_content_padding" + android:paddingBottom="@dimen/nav_content_padding"> @@ -34,10 +36,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:paddingTop="@dimen/nav_content_padding" - android:paddingBottom="@dimen/nav_content_padding" - android:clipChildren="false" - android:clipToPadding="false" /> + android:clipToPadding="false" + android:clipChildren="false" /> + android:clipToPadding="false" + android:clipChildren="false" />