diff options
-rw-r--r-- | res/values/attrs.xml | 1 | ||||
-rw-r--r-- | src/com/android/contacts/common/list/ContactListItemView.java | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/res/values/attrs.xml b/res/values/attrs.xml index f31ff02a..e4f79d1f 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -56,6 +56,7 @@ <attr name="list_item_header_text_color" format="color"/> <attr name="list_item_header_text_size" format="dimension"/> <attr name="list_item_header_height" format="dimension"/> + <attr name="list_item_name_text_color" format="color"/> <attr name="list_item_text_indent" format="dimension"/> <attr name="list_item_data_width_weight" format="integer"/> <attr name="list_item_label_width_weight" format="integer"/> 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()); |