summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2019-06-19 14:28:15 -0700
committerCole Faust <colefaust@google.com>2019-06-19 17:14:45 -0700
commita0a532cbb60cabac60f8c31cdb1d4d69782c7320 (patch)
tree8019870fb52241a2ec5e3f5dcc3ce877f719bb8d /res
parent18fac4b91499ea9cb584a62a31323f459d5e9aeb (diff)
downloadplatform_packages_apps_Car_Dialer-a0a532cbb60cabac60f8c31cdb1d4d69782c7320.tar.gz
platform_packages_apps_Car_Dialer-a0a532cbb60cabac60f8c31cdb1d4d69782c7320.tar.bz2
platform_packages_apps_Car_Dialer-a0a532cbb60cabac60f8c31cdb1d4d69782c7320.zip
Update favorites grid style
Fixes: 135496081 Test: Manually Change-Id: Ie0690e65e03c6fc65ca9ab0810671b1cc790d4b1
Diffstat (limited to 'res')
-rw-r--r--res/drawable/ic_add_favorite.xml39
-rw-r--r--res/layout/favorite_contact_list_item.xml85
-rw-r--r--res/values/arrays.xml2
-rw-r--r--res/values/colors.xml1
-rw-r--r--res/values/dimens.xml11
-rw-r--r--res/values/integer.xml2
-rw-r--r--res/values/strings.xml3
7 files changed, 76 insertions, 67 deletions
diff --git a/res/drawable/ic_add_favorite.xml b/res/drawable/ic_add_favorite.xml
new file mode 100644
index 00000000..20d741cc
--- /dev/null
+++ b/res/drawable/ic_add_favorite.xml
@@ -0,0 +1,39 @@
+<?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.
+ -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:width="@dimen/large_avatar_icon_size"
+ android:height="@dimen/large_avatar_icon_size">
+ <shape android:shape="rectangle">
+ <solid android:color="@color/add_favorite_background_color"/>
+ </shape>
+ </item>
+
+ <item android:width="@dimen/primary_icon_size"
+ android:height="@dimen/primary_icon_size"
+ android:gravity="center">
+ <vector android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:width="@dimen/primary_icon_size"
+ android:height="@dimen/primary_icon_size">
+
+ <path android:pathData="M0-.25h48v48H0z"/>
+ <path
+ android:fillColor="#fffafafa"
+ android:pathData="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
+ </vector>
+ </item>
+</layer-list>
diff --git a/res/layout/favorite_contact_list_item.xml b/res/layout/favorite_contact_list_item.xml
index 95c02a9a..82002fe1 100644
--- a/res/layout/favorite_contact_list_item.xml
+++ b/res/layout/favorite_contact_list_item.xml
@@ -13,62 +13,33 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<androidx.cardview.widget.CardView
+<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/card_container"
+ android:id="@+id/text_container"
android:layout_width="match_parent"
- android:layout_height="@dimen/favorite_item_height"
- app:cardCornerRadius="@dimen/favorite_card_corner_radius"
- app:cardElevation="@dimen/favorites_card_elevation">
-
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="?android:attr/selectableItemBackground">
- <ImageView
- android:id="@+id/icon"
- android:layout_width="@dimen/avatar_icon_size"
- android:layout_height="@dimen/avatar_icon_size"
- android:layout_marginStart="@dimen/favorites_icon_margin"
- android:scaleType="centerCrop"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"/>
-
- <androidx.constraintlayout.widget.Guideline
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/keyline_3"
- android:orientation="vertical"
- app:layout_constraintGuide_begin="@dimen/favorites_guideline"/>
-
- <LinearLayout
- android:id="@+id/text_container"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="@+id/keyline_3"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toTopOf="parent">
-
- <TextView
- android:id="@+id/title"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="@dimen/favorites_text_margin_bottom"
- android:layout_marginEnd="@dimen/favorites_text_margin_end"
- android:ellipsize="end"
- android:maxLines="1"/>
-
- <TextView
- android:id="@+id/text"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"/>
- </LinearLayout>
- </androidx.constraintlayout.widget.ConstraintLayout>
-</androidx.cardview.widget.CardView>
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:gravity="center_horizontal"
+ android:background="?android:attr/selectableItemBackground">
+
+ <ImageView
+ android:id="@+id/icon"
+ android:layout_width="@dimen/large_avatar_icon_size"
+ android:layout_height="@dimen/large_avatar_icon_size"
+ android:layout_marginBottom="@dimen/favorites_avatar_margin_bottom"
+ android:scaleType="centerCrop"/>
+
+ <TextView
+ android:id="@+id/title"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"/>
+
+ <TextView
+ android:id="@+id/text"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"/>
+</LinearLayout>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index c0ec5744..bdb4aa94 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -31,7 +31,7 @@
<!-- This array is mapped to tabs_config. -->
<!-- And it should be consistent with the mapping in the TelecomPageTab.Factory -->
<!--Add favorite tab back when we have favorite functionality-->
- <!--item>@string/favorites_title</item>-->
+ <!--<item>@string/favorites_title</item>-->
<item>@string/call_history_title</item>
<item>@string/contacts_title</item>
<item>@string/dialpad_title</item>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 2c3db906..4305fbbf 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -72,5 +72,6 @@
<color name="secondary_icon_color_dark">#8ADADCE0</color>
<color name="secondary_icon_color_light">#99FFFFFF</color>
<color name="hero_button_background_color">@*android:color/car_grey_868</color>
+ <color name="add_favorite_background_color">@*android:color/car_grey_868</color>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index f421f709..e636c586 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -101,14 +101,9 @@
<dimen name="keypad_margin_y">0dp</dimen>
<!-- Favorites dimensions -->
- <dimen name="favorite_item_height">@dimen/list_item_height</dimen>
- <dimen name="favorite_card_corner_radius">@*android:dimen/car_radius_5</dimen>
- <dimen name="favorite_card_space">@*android:dimen/car_padding_1</dimen>
- <dimen name="favorites_icon_margin">@dimen/list_item_padding</dimen>
- <dimen name="favorites_guideline">@dimen/list_item_guideline</dimen>
- <dimen name="favorites_text_margin_bottom">@*android:dimen/car_padding_1</dimen>
- <dimen name="favorites_text_margin_end">@dimen/list_item_padding</dimen>
- <dimen name="favorites_card_elevation">@dimen/control_bar_elevation</dimen>
+ <dimen name="favorite_card_space_horizontal">@*android:dimen/car_padding_3</dimen>
+ <dimen name="favorite_card_space_vertical">@*android:dimen/car_padding_4</dimen>
+ <dimen name="favorites_avatar_margin_bottom">@*android:dimen/car_padding_3</dimen>
<dimen name="call_fab_elevation">8dp</dimen>
<dimen name="bksp_button_width">@dimen/touch_target_size</dimen>
diff --git a/res/values/integer.xml b/res/values/integer.xml
index b836fe40..12151478 100644
--- a/res/values/integer.xml
+++ b/res/values/integer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources >
- <integer name="favorite_fragment_grid_column">2</integer>
+ <integer name="favorite_fragment_grid_column">3</integer>
</resources> \ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index aff6b661..a4c3335c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -94,6 +94,9 @@
<!-- Button to quickly text a number, when the user must first select a number. [CHAR LIMIT=30] -->
<string name="contact_details_text_number_button">Text</string>
+ <!-- Button to add start choosing a contact to add as a new favorite [CHAR_LIMIT=50] -->
+ <string name="add_favorite_button">Add a favorite</string>
+
<!-- Keypad strings-->
<string name="one" translatable="false">1</string>
<string name="two" translatable="false">2</string>