summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-05-21 18:05:56 -0700
committerAndrew Lee <anwlee@google.com>2014-05-22 12:53:53 -0700
commit6e765f9a71b450809c4916a5d5562cdc1372a39a (patch)
tree13e32bdd2f53ed169164af230112d9c063a4411b /res
parent4aecf0f557a805bb3f2715cade0ab15f6b99ad39 (diff)
Tidy up call log shadow/touch interactions.
- Constrain the recents list footer ripple to its dimensions. - Eliminate bottom margin on the call log list items. - Changed translationZ on expand to apply to the call log list item instead of just its primary action view. - Adjust the outline clipping so that a shadow doesn't appear under the day group header, now that the translation is applied to the entire list item. - Instantiated a number of fixed property values in onCreate() in the CallLogFragment, instead of whenever they're needed. Bug: 15165669 Change-Id: I5ed81ae49fb0c3f6eed360f247c1fd67278a628c
Diffstat (limited to 'res')
-rw-r--r--res/drawable/call_log_background.xml4
-rw-r--r--res/drawable/recent_lists_footer_background.xml23
-rw-r--r--res/layout/call_log_fragment.xml1
-rw-r--r--res/layout/call_log_list_item.xml23
-rw-r--r--res/layout/recents_list_footer.xml2
-rw-r--r--res/values/dimens.xml6
6 files changed, 39 insertions, 20 deletions
diff --git a/res/drawable/call_log_background.xml b/res/drawable/call_log_background.xml
index c0c488902..4857fb54a 100644
--- a/res/drawable/call_log_background.xml
+++ b/res/drawable/call_log_background.xml
@@ -15,5 +15,5 @@
limitations under the License.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:tint="?android:attr/colorControlHighlight"
- android:pinned="false" />
+ android:tint="?android:attr/colorControlHighlight"
+ android:pinned="false" /> \ No newline at end of file
diff --git a/res/drawable/recent_lists_footer_background.xml b/res/drawable/recent_lists_footer_background.xml
new file mode 100644
index 000000000..fccce7b7d
--- /dev/null
+++ b/res/drawable/recent_lists_footer_background.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ ~ Copyright (C) 2014 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
+ -->
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:tint="?android:attr/colorButtonPressed"
+ android:pinned="false">
+ <!-- Mask to constrain the ripple to the bounds of the view. -->
+ <item android:drawable="@android:color/transparent" />
+</ripple>
diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml
index 7b6aa28bc..fb7ed2a16 100644
--- a/res/layout/call_log_fragment.xml
+++ b/res/layout/call_log_fragment.xml
@@ -71,7 +71,6 @@
android:background="@color/background_dialer_list_items"
android:divider="@null"
android:nestedScrollingEnabled="true"
- android:clipChildren="false"
/>
<TextView android:id="@android:id/empty"
android:layout_width="match_parent"
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml
index 9182bd758..bdf14774e 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -14,16 +14,14 @@
limitations under the License.
-->
-<view
- xmlns:android="http://schemas.android.com/apk/res/android"
+<view xmlns:android="http://schemas.android.com/apk/res/android"
class="com.android.dialer.calllog.CallLogListItemView"
+ android:id="@+id/call_log_list_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingBottom="@dimen/call_log_outer_margin"
- android:id="@+id/call_log_list_item"
android:orientation="vertical"
- android:clipChildren="false"
->
+ android:background="@color/background_dialer_list_items" >
+
<!-- Day group heading. Used to show a "today", "yesterday", "last week" or "other" heading
above a group of call log entries. -->
<TextView
@@ -37,17 +35,16 @@
android:paddingTop="@dimen/call_log_day_group_padding"
android:paddingBottom="0dp"
/>
+
<!-- Linear layout to separate the primary area containing the contact badge and caller
information and the secondary action (call details / play voicemail). -->
<LinearLayout
android:id="@+id/call_log_row"
- android:background="@color/background_dialer_list_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="vertical"
- android:gravity="center_vertical"
- >
+ android:gravity="center_vertical" >
<!-- Primary area containing the contact badge and caller information -->
<LinearLayout
@@ -55,15 +52,15 @@
android:background="@drawable/call_log_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="@dimen/call_log_outer_margin"
- android:paddingRight="@dimen/call_log_outer_margin"
+ android:paddingStart="@dimen/call_log_outer_margin"
+ android:paddingEnd="@dimen/call_log_outer_margin"
android:paddingTop="@dimen/call_log_outer_margin"
+ android:paddingBottom="@dimen/call_log_outer_margin"
android:orientation="horizontal"
android:gravity="center_vertical"
android:focusable="true"
android:nextFocusRight="@+id/call_back_action"
- android:nextFocusLeft="@+id/quick_contact_photo"
- >
+ android:nextFocusLeft="@+id/quick_contact_photo" >
<QuickContactBadge
android:id="@+id/quick_contact_photo"
android:layout_width="@dimen/call_log_list_contact_photo_size"
diff --git a/res/layout/recents_list_footer.xml b/res/layout/recents_list_footer.xml
index 6156456d5..7670d81bb 100644
--- a/res/layout/recents_list_footer.xml
+++ b/res/layout/recents_list_footer.xml
@@ -30,4 +30,4 @@
android:textColor="@color/view_full_call_history_color"
android:textSize="14sp"
android:text="@string/recents_footer_text"
- android:background="?android:attr/selectableItemBackground" />
+ android:background="@drawable/recent_lists_footer_background" />
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 6d7aa84fb..f399e368e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -30,7 +30,7 @@
<dimen name="call_log_call_action_width">54dp</dimen>
<dimen name="call_log_icon_margin">4dip</dimen>
<dimen name="call_log_inner_margin">8dip</dimen>
- <dimen name="call_log_outer_margin">8dip</dimen>
+ <dimen name="call_log_outer_margin">8dp</dimen>
<dimen name="call_log_indent_margin">24dip</dimen>
<dimen name="call_log_list_item_height">56dip</dimen>
<dimen name="call_log_list_contact_photo_size">40dip</dimen>
@@ -130,8 +130,8 @@
<dimen name="call_log_secondary_text_size">14sp</dimen>
<!-- Height of the call log actions section for each call log entry -->
<dimen name="call_log_action_height">48dp</dimen>
- <!-- Elevation of expanded call log items. -->
- <dimen name="call_log_expanded_elevation">4dp</dimen>
+ <!-- Z Translation of expanded call log items. -->
+ <dimen name="call_log_expanded_translation_z">4dp</dimen>
<!-- Padding above call log day group headers. -->
<dimen name="call_log_day_group_padding">16dp</dimen>
</resources>