diff options
-rw-r--r-- | res/layout/call_log_fragment.xml | 5 | ||||
-rw-r--r-- | res/layout/call_log_list_item.xml | 3 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 6 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogFragment.java | 19 |
4 files changed, 11 insertions, 22 deletions
diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml index bb50730e8..74c630959 100644 --- a/res/layout/call_log_fragment.xml +++ b/res/layout/call_log_fragment.xml @@ -61,8 +61,8 @@ <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> - <!-- clipChildren=true is required to ensure shadows on elevated call log entries are not - clipped.--> + <!-- clipChildren=false is required to ensure shadows drawn + within list items aren't clipped by the list item bounds. --> <ListView android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="match_parent" @@ -71,6 +71,7 @@ android:background="@color/background_dialer_list_items" android:divider="@null" android:nestedScrollingEnabled="true" + android:clipChildren="false" /> <include diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml index 0f64e8b0a..193859273 100644 --- a/res/layout/call_log_list_item.xml +++ b/res/layout/call_log_list_item.xml @@ -19,8 +19,7 @@ android:id="@+id/call_log_list_item" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:background="@color/background_dialer_list_items" > + android:orientation="vertical"> <!-- Day group heading. Used to show a "today", "yesterday", "last week" or "other" heading above a group of call log entries. --> diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 16be30871..db67513da 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -894,7 +894,8 @@ public class CallLogAdapter extends GroupingListAdapter views.actionsView.setVisibility(View.VISIBLE); views.actionsView.setAlpha(1.0f); views.callLogEntryView.setBackgroundColor(mExpandedBackgroundColor); - callLogItem.setTranslationZ(mExpandedTranslationZ); + views.callLogEntryView.setTranslationZ(mExpandedTranslationZ); + callLogItem.setTranslationZ(mExpandedTranslationZ); // WAR // Attempt to give accessibility focus to one of the action buttons. // This ensures that a user realizes the expansion occurred. @@ -913,7 +914,8 @@ public class CallLogAdapter extends GroupingListAdapter } views.callLogEntryView.setBackgroundColor(mCallLogBackgroundColor); - callLogItem.setTranslationZ(0); + views.callLogEntryView.setTranslationZ(0); + callLogItem.setTranslationZ(0); // WAR } } diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java index 5d09e7445..52375ed6c 100644 --- a/src/com/android/dialer/calllog/CallLogFragment.java +++ b/src/com/android/dialer/calllog/CallLogFragment.java @@ -575,21 +575,6 @@ public class CallLogFragment extends ListFragment viewHolder.actionsView.setVisibility(View.VISIBLE); } - // If the day group header is shown, subtract the header from the outline of the - // view. The outline is used for generating the shadow of the view, but we only want - // a shadow on the call log list item and not the header. This is a slight hack, but - // the hierarchy of the call log list items makes it hard to achieve the desired - // shadow behavior otherwise. - if (viewHolder.dayGroupHeader.isShown()) { - Outline outline = new Outline(); - outline.setRect( - 0 /* left */, - viewHolder.dayGroupHeader.getHeight() /* top */, - view.getWidth() /* right */, - view.getHeight() /* bottom */); - view.setOutline(outline); - } - // Set up the fade effect for the action buttons. if (isExpand) { // Start the fade in after the expansion has partly completed, otherwise it @@ -620,7 +605,9 @@ public class CallLogFragment extends ListFragment // For each value from 0 to 1, animate the various parts of the layout. view.getLayoutParams().height = (int) (value * distance + baseHeight); - view.setTranslationZ(mExpandedItemTranslationZ * value); + float z = mExpandedItemTranslationZ * value; + viewHolder.callLogEntryView.setTranslationZ(z); + view.setTranslationZ(z); // WAR view.requestLayout(); } }); |