Display a generated avatar icon rather than a single default.

If the contact doesn't have an image, render a color-coded
background and the first letter of the contact's name.

1) Don't display anything during recipient resolution.

2) Display a # icon in material gray for recipients with no name.

3) Display a material group icon in material gray for groups with
   no avatar icon set.

Closes #3104

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-05-04 11:36:18 -07:00
parent 356d9949b7
commit 41cad291f9
24 changed files with 342 additions and 422 deletions

View File

@@ -17,14 +17,12 @@
android:paddingRight="10dp"
android:visibility="visible">
<com.makeramen.RoundedImageView
<org.thoughtcrime.securesms.components.AvatarImageView
android:id="@+id/contact_photo_image"
android:foreground="@drawable/contact_photo_background"
android:layout_width="50dp"
android:layout_height="50dp"
app:riv_oval="true"
android:cropToPadding="true"
android:scaleType="centerCrop"
android:visibility="gone"
tools:src="@drawable/ic_contact_picture"
android:contentDescription="@string/conversation_list_item_view__contact_photo_image"
@@ -49,7 +47,8 @@
android:weightSum="1"
android:gravity="bottom">
<TextView android:id="@+id/from"
<org.thoughtcrime.securesms.components.FromTextView
android:id="@+id/from"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"