diff options
author | Andrew Lee <anwlee@google.com> | 2014-06-11 10:50:35 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-06-11 10:50:35 +0000 |
commit | aaeea64a83bdd73665f5999c3645af35e341139c (patch) | |
tree | ae25dea694b54260fc602a1248d35e1fb9ed9d00 /src | |
parent | e42b8ca160db365adb3dd99a5792a778b12ca081 (diff) | |
parent | a9a75dc1956f4b6a3d3527b7b9e204acbb316b68 (diff) |
am a9a75dc1: Merge "UI improvements on tabs, recent expanded card, speed dial grid." into lmp-preview-dev
* commit 'a9a75dc1956f4b6a3d3527b7b9e204acbb316b68':
UI improvements on tabs, recent expanded card, speed dial grid.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 12edaa0f2..4b1aeabe5 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -248,6 +248,10 @@ public class CallLogAdapter extends GroupingListAdapter private ImageView mBadgeImageView; private TextView mBadgeText; + private int mCallLogBackgroundColor; + private int mExpandedBackgroundColor; + private float mExpandedTranslationZ; + /** Listener for the primary or secondary actions in the list. * Primary opens the call details. * Secondary calls or plays. @@ -349,6 +353,9 @@ public class CallLogAdapter extends GroupingListAdapter Resources resources = mContext.getResources(); CallTypeHelper callTypeHelper = new CallTypeHelper(resources); + mCallLogBackgroundColor = resources.getColor(R.color.background_dialer_list_items); + mExpandedBackgroundColor = resources.getColor(R.color.call_log_expanded_background_color); + mExpandedTranslationZ = resources.getDimension(R.dimen.call_log_expanded_translation_z); mContactPhotoManager = ContactPhotoManager.getInstance(mContext); mPhoneNumberHelper = new PhoneNumberDisplayHelper(resources); @@ -856,10 +863,8 @@ public class CallLogAdapter extends GroupingListAdapter views.actionsView.setVisibility(View.VISIBLE); views.actionsView.setAlpha(1.0f); - views.callLogEntryView.setBackgroundColor( - callLogItem.getResources().getColor(R.color.background_dialer_light)); - callLogItem.setTranslationZ(callLogItem.getResources().getDimension( - R.dimen.call_log_expanded_translation_z)); + views.callLogEntryView.setBackgroundColor(mExpandedBackgroundColor); + callLogItem.setTranslationZ(mExpandedTranslationZ); // Attempt to give accessibility focus to one of the action buttons. // This ensures that a user realizes the expansion occurred. @@ -876,8 +881,7 @@ public class CallLogAdapter extends GroupingListAdapter views.actionsView.setVisibility(View.GONE); } - views.callLogEntryView.setBackgroundColor( - callLogItem.getResources().getColor(R.color.background_dialer_list_items)); + views.callLogEntryView.setBackgroundColor(mCallLogBackgroundColor); callLogItem.setTranslationZ(0); } } |