summaryrefslogtreecommitdiffstats
path: root/res/values/colors.xml
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-02-12 14:58:25 -0800
committerYorke Lee <yorkelee@google.com>2014-02-28 12:23:44 -0800
commit6084726fbdda78bdb16e2d4cc1c3b81c84fd5da1 (patch)
treed8f528c76a3342bdafde89bc0907fff8b660d02b /res/values/colors.xml
parent2105200e6414a7a35596f792af08a8841333a41d (diff)
downloadandroid_packages_apps_ContactsCommon-6084726fbdda78bdb16e2d4cc1c3b81c84fd5da1.tar.gz
android_packages_apps_ContactsCommon-6084726fbdda78bdb16e2d4cc1c3b81c84fd5da1.tar.bz2
android_packages_apps_ContactsCommon-6084726fbdda78bdb16e2d4cc1c3b81c84fd5da1.zip
Add support for letter tile avatars to ContactsPhotoManager
* Add LetterTileDrawable, a custom drawable used to display letter tiles for contacts without a contact photo, instead of static bitmap resource drawables. * Add a class DefaultImageRequest to ContactPhotoManager. This is essentially a data holder object used to store and retrieve various parameters that clients can use to configure the way they want their requested letter tile avatars to be drawn. * Add LetterTileImageProvider to ContactPhotoManager. LetterTileImageProvider extends DefaultImageProvider, but returns instances of LetterTileDrawable instead of BitmapDrawables when a default contact image is needed. * Add two new APIs to ContactPhotoManager: getDefaultAvatarForContact - This returns an instance of a LetterTileDrawable, configured with the display parameters stored in the provided DefaultImageRequest. getDefaultAvatarUriForContact - This returns an uri which the ContactPhotoManager can use to recreate a DefaultImageRequest and hence a LetterTileDrawable. * Modify ContactPhotoManager.loadPhoto and loadThumbnail to accept a DefaultImageRequest as a parameter. * Modify the following classes to use the new ContactPhotoManager APIs. These affect both the Dialer and People apps. ContactEntryListADapter ContactListAdapter ContactTileView PhoneNumberListAdapter Bug: 13101785 Change-Id: Id1a87b459d6e63c42049739059a3b3ee202af837
Diffstat (limited to 'res/values/colors.xml')
-rw-r--r--res/values/colors.xml15
1 files changed, 15 insertions, 0 deletions
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 65abd95c..3e5127e0 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -47,4 +47,19 @@
<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 -->
+ <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>
+ </array>
+ <color name="letter_tile_default_color">#cccccc</color>
+
+ <color name="letter_tile_font_color">#ffffff</color>
</resources>