diff options
author | Cole Faust <colefaust@google.com> | 2019-06-17 18:07:00 -0700 |
---|---|---|
committer | Cole Faust <colefaust@google.com> | 2019-06-17 18:13:08 -0700 |
commit | ebfd982238fb707523c3381ee5312eecae35213d (patch) | |
tree | 6edee6997b92eb10fbb13e428176bce537ffecd2 /res | |
parent | ae6d6b87503bea5d4afa67dd4109f97bfa03836c (diff) | |
download | platform_packages_apps_Car_Dialer-ebfd982238fb707523c3381ee5312eecae35213d.tar.gz platform_packages_apps_Car_Dialer-ebfd982238fb707523c3381ee5312eecae35213d.tar.bz2 platform_packages_apps_Car_Dialer-ebfd982238fb707523c3381ee5312eecae35213d.zip |
Replace text button with favorite button in contact details
Also remove the hero buttons. The favorites tab has also been changed
from a heart to a star to match the new buttons and the phone's dialer.
Fixes: 134524067
Test: Manually
Change-Id: Ic821eaa37458e0678dd6812864db7197b11cca38
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/ic_favorite.xml | 2 | ||||
-rw-r--r-- | res/drawable/ic_favorite_activatable.xml | 21 | ||||
-rw-r--r-- | res/drawable/ic_favorite_empty.xml | 24 | ||||
-rw-r--r-- | res/layout-h1200dp/contact_details_name_image.xml | 72 | ||||
-rw-r--r-- | res/layout/contact_details_number.xml | 4 | ||||
-rw-r--r-- | res/values/styles.xml | 15 |
6 files changed, 48 insertions, 90 deletions
diff --git a/res/drawable/ic_favorite.xml b/res/drawable/ic_favorite.xml index 0f41e843..78428b97 100644 --- a/res/drawable/ic_favorite.xml +++ b/res/drawable/ic_favorite.xml @@ -20,5 +20,5 @@ android:viewportHeight="24.0"> <path android:fillColor="#FF000000" - android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"/> + android:pathData="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/> </vector> diff --git a/res/drawable/ic_favorite_activatable.xml b/res/drawable/ic_favorite_activatable.xml new file mode 100644 index 00000000..72855133 --- /dev/null +++ b/res/drawable/ic_favorite_activatable.xml @@ -0,0 +1,21 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Copyright (C) 2019 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/ic_favorite_empty" + android:state_activated="false"/> + <item android:drawable="@drawable/ic_favorite" + android:state_activated="true"/> +</selector> diff --git a/res/drawable/ic_favorite_empty.xml b/res/drawable/ic_favorite_empty.xml new file mode 100644 index 00000000..2e2863f4 --- /dev/null +++ b/res/drawable/ic_favorite_empty.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2019 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="@dimen/primary_icon_size" + android:height="@dimen/primary_icon_size" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FF000000" + android:pathData="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/> +</vector> diff --git a/res/layout-h1200dp/contact_details_name_image.xml b/res/layout-h1200dp/contact_details_name_image.xml deleted file mode 100644 index 40a9685e..00000000 --- a/res/layout-h1200dp/contact_details_name_image.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2017 The Android Open Source Project - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<androidx.constraintlayout.widget.ConstraintLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - - <ImageView - android:id="@+id/avatar" - android:layout_width="@dimen/contact_details_avatar_size" - android:layout_height="@dimen/contact_details_avatar_size" - android:layout_marginTop="@dimen/contact_details_avatar_margin_top" - app:layout_constraintVertical_chainStyle="packed" - app:layout_constraintBottom_toTopOf="@+id/title" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintTop_toTopOf="parent"/> - - <TextView - android:id="@id/title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:singleLine="true" - android:layout_marginTop="@dimen/contact_details_title_margin_top" - android:layout_marginBottom="@dimen/contact_details_title_margin_bottom" - android:textAppearance="@style/TextAppearance.ContactDetailsTitle" - app:layout_constraintTop_toBottomOf="@id/avatar" - app:layout_constraintBottom_toTopOf="@id/quick_actions_barrier" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent"/> - - <androidx.constraintlayout.widget.Barrier - android:id="@+id/quick_actions_barrier" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - app:barrierDirection="top" - app:constraint_referenced_ids="call_hero_button,text_hero_button" /> - - <TextView - android:id="@+id/call_hero_button" - android:drawableStart="@drawable/ic_phone" - android:layout_marginBottom="@dimen/contact_details_quick_actions_margin_bottom" - style="@style/hero_button" - app:layout_constraintHorizontal_chainStyle="packed" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toStartOf="@id/text_hero_button"/> - - <TextView - android:id="@+id/text_hero_button" - android:drawableStart="@drawable/ic_message" - android:layout_marginStart="@dimen/hero_button_separator" - android:layout_marginBottom="@dimen/contact_details_quick_actions_margin_bottom" - style="@style/hero_button" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintStart_toEndOf="@id/call_hero_button" - app:layout_constraintEnd_toEndOf="parent"/> -</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/res/layout/contact_details_number.xml b/res/layout/contact_details_number.xml index 9c93d6ff..3a18d9d3 100644 --- a/res/layout/contact_details_number.xml +++ b/res/layout/contact_details_number.xml @@ -61,11 +61,11 @@ app:layout_constraintEnd_toEndOf="parent"/> <ImageView - android:id="@+id/contact_details_text_button_icon" + android:id="@+id/contact_details_favorite_button" android:layout_width="0dp" android:layout_height="match_parent" android:scaleType="center" - android:src="@drawable/ic_message" + android:src="@drawable/ic_favorite_activatable" android:tint="@color/contact_details_icon_tint" android:background="?android:attr/selectableItemBackground" app:layout_constraintStart_toStartOf="@id/divider" diff --git a/res/values/styles.xml b/res/values/styles.xml index 8d074579..2507ad0f 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -125,21 +125,6 @@ <style name="TextAppearance.ContactResultTitle" parent="@style/TextAppearance.Body1"/> - <style name="hero_button"> - <item name="android:layout_width">wrap_content</item> - <item name="android:layout_height">@dimen/touch_target_size</item> - <item name="android:gravity">center_vertical</item> - <item name="android:drawablePadding">@*android:dimen/car_padding_3</item> - <item name="android:drawableTint">@color/primary_icon_color</item> - <item name="android:minWidth">156dp</item> - <item name="android:maxWidth">268dp</item> - <item name="android:background">@drawable/hero_button_background</item> - <item name="android:paddingStart">@*android:dimen/car_padding_3</item> - <item name="android:paddingEnd">@*android:dimen/car_padding_4</item> - <item name="android:textAppearance">@style/TextAppearance.Body3</item> - <item name="android:singleLine">true</item> - </style> - <!-- Display options defined for ActionBar--> <style name="RootToolbarDisplayOptions"> <item name="android:displayOptions">useLogo|showHome|showTitle|showCustom</item> |