summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-03-05 20:01:16 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-05 20:01:16 +0000
commit3c261b1422b12de9a5cdaeb646385d7b97a710a5 (patch)
treeb6f59808ada77773ad2317f2c4e9432e465a4c63
parentee8df7615a48a8fe9372ff4c013774d661413b73 (diff)
parent54377fb7f2121fc1c69eb34c80a3bf6744fe9407 (diff)
downloadandroid_packages_apps_ContactsCommon-3c261b1422b12de9a5cdaeb646385d7b97a710a5.tar.gz
android_packages_apps_ContactsCommon-3c261b1422b12de9a5cdaeb646385d7b97a710a5.tar.bz2
android_packages_apps_ContactsCommon-3c261b1422b12de9a5cdaeb646385d7b97a710a5.zip
am 54377fb7: am 8559dbed: am 28257f2b: am d2c694be: Tweaks to redlines for letter tile avatars
* commit '54377fb7f2121fc1c69eb34c80a3bf6744fe9407': Tweaks to redlines for letter tile avatars
-rw-r--r--res/values/colors.xml19
-rw-r--r--src/com/android/contacts/common/list/ContactTileView.java13
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.
*