summaryrefslogtreecommitdiffstats
path: root/src/com/android/contacts/common/list/ContactListItemView.java
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-05-23 11:03:21 -0700
committerNancy Chen <nancychen@google.com>2014-05-23 18:46:29 +0000
commitb478fa93247b26b8797128563c089da3db542f55 (patch)
tree71254516ea29d21929d19e3306ec177db8f6fd59 /src/com/android/contacts/common/list/ContactListItemView.java
parent914484fec1f71e1f336fab5e81b310e3edab229e (diff)
downloadandroid_packages_apps_ContactsCommon-b478fa93247b26b8797128563c089da3db542f55.tar.gz
android_packages_apps_ContactsCommon-b478fa93247b26b8797128563c089da3db542f55.tar.bz2
android_packages_apps_ContactsCommon-b478fa93247b26b8797128563c089da3db542f55.zip
[DO NOT MERGE] Add attibute for color on contacts list search items
Adding the ability to change the color on the contacts list search items. The actual colors are defined in Dialer. Bug: 15118603 Change-Id: I8e332e9c448cbcc4e4f64349d9ff5474bb06eb2f (cherry picked from commit f88b7b9d1a07414053a4a90d13d453a02bd58ac7)
Diffstat (limited to 'src/com/android/contacts/common/list/ContactListItemView.java')
-rw-r--r--src/com/android/contacts/common/list/ContactListItemView.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/contacts/common/list/ContactListItemView.java b/src/com/android/contacts/common/list/ContactListItemView.java
index 186ee8b4..5d3ff3ce 100644
--- a/src/com/android/contacts/common/list/ContactListItemView.java
+++ b/src/com/android/contacts/common/list/ContactListItemView.java
@@ -186,6 +186,7 @@ public class ContactListItemView extends ViewGroup
private boolean mPhotoViewWidthAndHeightAreReady = false;
private int mNameTextViewHeight;
+ private int mNameTextViewTextColor;
private int mPhoneticNameTextViewHeight;
private int mLabelViewHeight;
private int mDataViewHeight;
@@ -251,6 +252,9 @@ public class ContactListItemView extends ViewGroup
mLabelViewWidthWeight = a.getInteger(
R.styleable.ContactListItemView_list_item_label_width_weight,
mLabelViewWidthWeight);
+ mNameTextViewTextColor = a.getColor(
+ R.styleable.ContactListItemView_list_item_name_text_color,
+ mNameTextViewTextColor);
setPaddingRelative(
a.getDimensionPixelOffset(
@@ -833,6 +837,7 @@ public class ContactListItemView extends ViewGroup
mNameTextView.setSingleLine(true);
mNameTextView.setEllipsize(getTextEllipsis());
mNameTextView.setTextAppearance(getContext(), R.style.TextAppearanceMedium);
+ mNameTextView.setTextColor(mNameTextViewTextColor);
// Manually call setActivated() since this view may be added after the first
// setActivated() call toward this whole item view.
mNameTextView.setActivated(isActivated());