diff options
-rw-r--r-- | res/values/colors.xml | 19 | ||||
-rw-r--r-- | src/com/android/contacts/common/list/ContactTileView.java | 13 |
2 files changed, 22 insertions, 10 deletions
diff --git a/res/values/colors.xml b/res/values/colors.xml index 3e5127e0..d7597897 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -48,16 +48,17 @@ <color name="textColorIconOverlay">#fff</color> <color name="textColorIconOverlayShadow">#000</color> - <!-- Make sure to also update LetterTileProvider#NUM_OF_TILE_COLORS when adding or removing colors --> + <!-- Make sure to also update LetterTileProvider#NUM_OF_TILE_COLORS when adding or removing + colors --> <array name="letter_tile_colors"> - <item>#f16364</item> - <item>#f58559</item> - <item>#f9a43e</item> - <item>#e4c62e</item> - <item>#67bf74</item> - <item>#59a2be</item> - <item>#2093cd</item> - <item>#ad62a7</item> + <item>#33b679</item> + <item>#536173</item> + <item>#855e86</item> + <item>#df5948</item> + <item>#aeb857</item> + <item>#547bca</item> + <item>#ae6b23</item> + <item>#e5ae4f</item> </array> <color name="letter_tile_default_color">#cccccc</color> diff --git a/src/com/android/contacts/common/list/ContactTileView.java b/src/com/android/contacts/common/list/ContactTileView.java index 740f75af..4645f78b 100644 --- a/src/com/android/contacts/common/list/ContactTileView.java +++ b/src/com/android/contacts/common/list/ContactTileView.java @@ -126,8 +126,8 @@ public abstract class ContactTileView extends FrameLayout { if (mPhotoManager != null) { DefaultImageRequest request = getDefaultImageRequest(entry.name, entry.lookupKey); + configureViewForImage(entry.photoUri == null); if (mPhoto != null) { - mPhotoManager.loadPhoto(mPhoto, entry.photoUri, getApproximateImageSize(), isDarkTheme(), request); @@ -186,6 +186,17 @@ public abstract class ContactTileView extends FrameLayout { protected abstract boolean isDarkTheme(); /** + * Implemented by subclasses to reconfigure the view's layout and subviews, based on whether + * or not the contact has a user-defined photo. + * + * @param isDefaultImage True if the contact does not have a user-defined contact photo + * (which means a default contact image will be applied by the {@link ContactPhotoManager} + */ + protected void configureViewForImage(boolean isDefaultImage) { + // No-op by default. + } + + /** * Implemented by subclasses to allow them to return a {@link DefaultImageRequest} with the * various image parameters defined to match their own layouts. * |