diff options
author | Chris Craik <ccraik@google.com> | 2014-07-18 11:17:12 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2014-07-18 12:10:50 -0700 |
commit | 0d8019cf7cb048e5da044559460e08c5284d8f48 (patch) | |
tree | 87a1ad23f312b32bf74f9ba86b96b57e72671af4 /src/com/android/dialer | |
parent | e06611fa108e7e9aa1fe23f14c3433a80c3dcb17 (diff) |
Replace shadow workaround with a different one
bug:15023558
Change-Id: Ie85b281ff77694874953ff88297e0d034560c82b
Diffstat (limited to 'src/com/android/dialer')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 6 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogFragment.java | 19 |
2 files changed, 7 insertions, 18 deletions
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(); } }); |