From 6a7094d43af37cfb1d173309e73f9196cccb61f0 Mon Sep 17 00:00:00 2001 From: Jon Spivack Date: Mon, 10 May 2021 18:22:52 -0700 Subject: [PATCH] Rework NIU Actions buttons UI The shapes, colors, icons, and layout of the NIU Actions buttons have been updated to match the latest UI specs. The icons also no longer overlap with the layout above them, which solves a picking issue. Bug: 186004471 Bug: 187460625 Test: Manual (tried on Wembley and Pixel 3A) Change-Id: Ie7a0ca0c21805fc0f126053ec791fd2460710d33 --- go/quickstep/res/drawable/ic_listen.xml | 22 ++--- go/quickstep/res/drawable/ic_search.xml | 28 +++--- go/quickstep/res/drawable/ic_translate.xml | 22 ++--- .../res/drawable/round_rect_button.xml | 20 ++++ .../res/layout/overview_actions_container.xml | 96 ++++++++++--------- go/quickstep/res/values/colors.xml | 21 ++++ go/quickstep/res/values/dimens.xml | 26 +++++ go/quickstep/res/values/styles.xml | 33 +++++-- 8 files changed, 174 insertions(+), 94 deletions(-) create mode 100644 go/quickstep/res/drawable/round_rect_button.xml create mode 100644 go/quickstep/res/values/colors.xml create mode 100644 go/quickstep/res/values/dimens.xml diff --git a/go/quickstep/res/drawable/ic_listen.xml b/go/quickstep/res/drawable/ic_listen.xml index a8e6c9382a..16bb59789b 100644 --- a/go/quickstep/res/drawable/ic_listen.xml +++ b/go/quickstep/res/drawable/ic_listen.xml @@ -13,20 +13,12 @@ limitations under the License. --> + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + android:tint="?attr/colorControlNormal"> - - - + android:fillColor="@android:color/white" + android:pathData="M15.08,7.05c0.84,1.18 0.84,2.71 0,3.89l1.68,1.69c2.02,-2.02 2.02,-5.07 0,-7.27l-1.68,1.69zM20.07,2l-1.63,1.63c2.77,3.02 2.77,7.56 0,10.74L20.07,16c3.9,-3.89 3.91,-9.95 0,-14zM9,13c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM9,7c1.1,0 2,0.9 2,2s-0.9,2 -2,2 -2,-0.9 -2,-2 0.9,-2 2,-2zM9,14c-2.67,0 -8,1.34 -8,4v3h16v-3c0,-2.66 -5.33,-4 -8,-4zM15,19L3,19v-0.99C3.2,17.29 6.3,16 9,16s5.8,1.29 6,2v1z"/> diff --git a/go/quickstep/res/drawable/ic_search.xml b/go/quickstep/res/drawable/ic_search.xml index 4307330414..ce290d9901 100644 --- a/go/quickstep/res/drawable/ic_search.xml +++ b/go/quickstep/res/drawable/ic_search.xml @@ -13,20 +13,24 @@ limitations under the License. --> + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + android:tint="?attr/colorControlNormal"> + android:fillColor="@android:color/white" + android:pathData="M16,3h-2v2h2c1.65,0 3,1.35 3,3v2h2V8C21,5.24 18.76,3 16,3z"/> + android:fillColor="@android:color/white" + android:pathData="M5,16v-2H3v2c0,2.76 2.24,5 5,5h2v-2H8C6.35,19 5,17.65 5,16z"/> + android:fillColor="@android:color/white" + android:pathData="M12,8.5c-1.93,0 -3.5,1.57 -3.5,3.5s1.57,3.5 3.5,3.5s3.5,-1.57 3.5,-3.5S13.93,8.5 12,8.5z"/> + android:fillColor="@android:color/white" + android:pathData="M18,18m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"/> + diff --git a/go/quickstep/res/drawable/ic_translate.xml b/go/quickstep/res/drawable/ic_translate.xml index 1247807fcd..e3df56fdb8 100644 --- a/go/quickstep/res/drawable/ic_translate.xml +++ b/go/quickstep/res/drawable/ic_translate.xml @@ -13,20 +13,12 @@ limitations under the License. --> + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24" + android:tint="?attr/colorControlNormal"> - - - + android:fillColor="@android:color/white" + android:pathData="M12.87,15.07l-2.54,-2.51 0.03,-0.03c1.74,-1.94 2.98,-4.17 3.71,-6.53L17,6L17,4h-7L10,2L8,2v2L1,4v1.99h11.17C11.5,7.92 10.44,9.75 9,11.35 8.07,10.32 7.3,9.19 6.69,8h-2c0.73,1.63 1.73,3.17 2.98,4.56l-5.09,5.02L4,19l5,-5 3.11,3.11 0.76,-2.04zM18.5,10h-2L12,22h2l1.12,-3h4.75L21,22h2l-4.5,-12zM15.88,17l1.62,-4.33L19.12,17h-3.24z"/> diff --git a/go/quickstep/res/drawable/round_rect_button.xml b/go/quickstep/res/drawable/round_rect_button.xml new file mode 100644 index 0000000000..b276686a41 --- /dev/null +++ b/go/quickstep/res/drawable/round_rect_button.xml @@ -0,0 +1,20 @@ + + + + + diff --git a/go/quickstep/res/layout/overview_actions_container.xml b/go/quickstep/res/layout/overview_actions_container.xml index 4aa77744aa..6a331ea235 100644 --- a/go/quickstep/res/layout/overview_actions_container.xml +++ b/go/quickstep/res/layout/overview_actions_container.xml @@ -25,7 +25,7 @@ android:id="@+id/action_buttons" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center" + android:layout_gravity="top|center_horizontal" android:orientation="horizontal"> -