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 9e90f24dc5)
This commit is contained in:
Matthew Ng
2018-08-09 13:55:05 -07:00
parent 7795e97f27
commit 7daaaad74a
2 changed files with 14 additions and 18 deletions

View File

@@ -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">
<com.android.systemui.statusbar.phone.NearestTouchFrame
android:id="@+id/nav_buttons"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="@dimen/rounded_corner_content_padding"
android:paddingEnd="@dimen/rounded_corner_content_padding"
android:clipChildren="false"
android:clipToPadding="false">
@@ -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" />

View File

@@ -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">
<com.android.systemui.statusbar.phone.NearestTouchFrame
android:id="@+id/nav_buttons"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/rounded_corner_content_padding"
android:paddingBottom="@dimen/rounded_corner_content_padding"
android:clipChildren="false"
android:clipToPadding="false">
@@ -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" />
<com.android.systemui.statusbar.phone.ReverseLinearLayout
android:id="@+id/center_group"
@@ -45,10 +45,8 @@
android:layout_height="match_parent"
android:gravity="center"
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" />
</com.android.systemui.statusbar.phone.NearestTouchFrame>