diff options
author | calderwoodra <calderwoodra@google.com> | 2018-04-23 15:22:26 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-23 16:49:13 -0700 |
commit | 6c2357ae634cd3413c699d71c542fd5fced48002 (patch) | |
tree | 7e0d5fbdcc66dd4fff5944d1d293044647c19fa0 /java/com/android/dialer/speeddial/res | |
parent | a3f8a79fb2da3d9e11ce1ff178b76cf00719fd56 (diff) |
Implemented context menu actions.
Actions implemented in this CL:
- placing a voice call
- placing a video call
- opening an sms conversation
- opening a contact card
Remove action will be implemented in a follow up CL.
Made a few adjustments to the context menu UI.
Bug: 77761023
Test: ContextMenuTest
PiperOrigin-RevId: 193994428
Change-Id: I85b328f5820175ff91514c0057267b85649b0755
Diffstat (limited to 'java/com/android/dialer/speeddial/res')
4 files changed, 37 insertions, 27 deletions
diff --git a/java/com/android/dialer/speeddial/res/drawable/context_menu_contact_icon.xml b/java/com/android/dialer/speeddial/res/drawable/context_menu_contact_icon.xml new file mode 100644 index 000000000..73260b156 --- /dev/null +++ b/java/com/android/dialer/speeddial/res/drawable/context_menu_contact_icon.xml @@ -0,0 +1,30 @@ +<?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 + --> + +<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="oval"> + <solid android:color="@color/secondary_text_color"/> + <size android:width="24dp" android:height="24dp"/> + </shape> + </item> + <item + android:width="24dp" + android:height="24dp" + android:gravity="center" + android:drawable="@drawable/product_logo_avatar_anonymous_white_color_120"/> +</layer-list>
\ No newline at end of file diff --git a/java/com/android/dialer/speeddial/res/layout/add_favorite_activity.xml b/java/com/android/dialer/speeddial/res/layout/add_favorite_activity.xml deleted file mode 100644 index 4df2f29b4..000000000 --- a/java/com/android/dialer/speeddial/res/layout/add_favorite_activity.xml +++ /dev/null @@ -1,21 +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 - --> -<FrameLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/add_favorite_container" - android:layout_width="match_parent" - android:layout_height="match_parent"/>
\ No newline at end of file diff --git a/java/com/android/dialer/speeddial/res/layout/context_menu_layout.xml b/java/com/android/dialer/speeddial/res/layout/context_menu_layout.xml index 4fb12ffe9..a59fa07c7 100644 --- a/java/com/android/dialer/speeddial/res/layout/context_menu_layout.xml +++ b/java/com/android/dialer/speeddial/res/layout/context_menu_layout.xml @@ -20,7 +20,6 @@ android:orientation="vertical" android:layout_width="160dp" android:layout_height="wrap_content" - android:elevation="8dp" android:clipChildren="true" android:clipToPadding="false"> @@ -83,13 +82,12 @@ android:drawableStart="@drawable/quantum_ic_close_vd_theme_24" style="@style/SpeedDialContextMenuItem"/> - <!-- TODO(calderwoodra): Update this icon to be the contact icon. --> <TextView android:id="@+id/contact_info_container" android:layout_width="match_parent" android:layout_height="wrap_content" + android:drawableStart="@drawable/context_menu_contact_icon" android:text="@string/contact_menu_contact_info" - android:drawableStart="@drawable/quantum_ic_call_vd_theme_24" - style="@style/SpeedDialContextMenuItem"/> + style="@style/SpeedDialContextMenuItem.NoDrawableTint"/> </LinearLayout> </com.android.dialer.speeddial.ContextMenu>
\ No newline at end of file diff --git a/java/com/android/dialer/speeddial/res/values/styles.xml b/java/com/android/dialer/speeddial/res/values/styles.xml index 83bbd09e5..46dbc359a 100644 --- a/java/com/android/dialer/speeddial/res/values/styles.xml +++ b/java/com/android/dialer/speeddial/res/values/styles.xml @@ -15,11 +15,14 @@ ~ limitations under the License --> <resources> - <style name="SpeedDialContextMenuItem" parent="SecondaryText"> + <style name="SpeedDialContextMenuItem" parent="SpeedDialContextMenuItem.NoDrawableTint"> + <item name="android:drawableTint">@color/secondary_text_color</item> + </style> + + <style name="SpeedDialContextMenuItem.NoDrawableTint" parent="SecondaryText"> <item name="android:paddingStart">12dp</item> <item name="android:minHeight">48dp</item> <item name="android:gravity">center_vertical</item> - <item name="android:drawableTint">@color/secondary_text_color</item> <item name="android:drawablePadding">12dp</item> <item name="android:clickable">true</item> <item name="android:background">?android:attr/selectableItemBackground</item> |