Increase size of the back/ime switcher buttons in gesture nav

- This matches the size of the back/ime switcher buttons in
  button nav. Previously we intercepted all touches in the nav
  bar, but since the IME is interested in handling touches in
  the bar (where there are no buttons), we moved to specific
  touch regions for each button. As a result, only the immediate
  button size was tappable making the target too small.
- Also make the parents in the hierarchy non-clipping so that
  it doesn't clip the background ripple with the larger size

Bug: 184983443
Test: Show the IME, verify the buttons are larger
Change-Id: I4db6df26d8a1e1bd6675635224baa9a9ee6de044
This commit is contained in:
Winson Chung
2021-05-10 17:05:58 -07:00
parent 4f2e331f25
commit c6312b461b
3 changed files with 8 additions and 2 deletions

View File

@@ -22,11 +22,15 @@
android:id="@+id/navigation_bar_view"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:clipChildren="false"
android:clipToPadding="false"
android:background="@drawable/system_bar_background">
<com.android.systemui.navigationbar.NavigationBarInflaterView
android:id="@+id/navigation_inflater"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false" />
</com.android.systemui.navigationbar.NavigationBarView>

View File

@@ -23,6 +23,8 @@
android:layout_marginEnd="@dimen/rounded_corner_content_padding"
android:paddingStart="@dimen/nav_content_padding"
android:paddingEnd="@dimen/nav_content_padding"
android:clipChildren="false"
android:clipToPadding="false"
android:id="@+id/horizontal">
<com.android.systemui.navigationbar.buttons.NearestTouchFrame

View File

@@ -349,7 +349,7 @@
<!-- Nav bar button default ordering/layout -->
<string name="config_navBarLayout" translatable="false">left[.5W],back[1WC];home;recent[1WC],right[.5W]</string>
<string name="config_navBarLayoutQuickstep" translatable="false">back[1.7WC];home;contextual[1.7WC]</string>
<string name="config_navBarLayoutHandle" translatable="false">back[40AC];home_handle;ime_switcher[40AC]</string>
<string name="config_navBarLayoutHandle" translatable="false">back[70AC];home_handle;ime_switcher[70AC]</string>
<bool name="quick_settings_show_full_alarm">false</bool>