Merge "Setting call log item elevation and background color when items are expanded/shrunk per redlines."
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml
index eaf2a80..b7e9696 100644
--- a/res/layout/call_log_list_item.xml
+++ b/res/layout/call_log_list_item.xml
@@ -52,7 +52,6 @@
android:padding="@dimen/call_log_outer_margin"
android:orientation="horizontal"
android:gravity="center_vertical"
- android:background="?android:attr/selectableItemBackground"
android:focusable="true"
android:nextFocusRight="@+id/call_back_action"
android:nextFocusLeft="@+id/quick_contact_photo"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index c9eeacf..bf24f1e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -125,4 +125,6 @@
<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>
</resources>
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java
index a8cd72a..8bd4c08 100644
--- a/src/com/android/dialer/calllog/CallLogAdapter.java
+++ b/src/com/android/dialer/calllog/CallLogAdapter.java
@@ -769,6 +769,10 @@
if (expanded) {
views.actionsView.setVisibility(View.VISIBLE);
+ callLogItem.setBackgroundColor(
+ callLogItem.getResources().getColor(R.color.background_dialer_light));
+ callLogItem.setElevation(
+ callLogItem.getResources().getDimension(R.dimen.call_log_expanded_elevation));
// Attempt to give accessibility focus to one of the action buttons.
// This ensures that a user realizes the expansion occurred.
@@ -780,6 +784,9 @@
views.deleteButtonView.requestAccessibilityFocus();
} else {
views.actionsView.setVisibility(View.GONE);
+ callLogItem.setBackgroundColor(
+ callLogItem.getResources().getColor(R.color.background_dialer_list_items));
+ callLogItem.setElevation(0);
}
}