mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-18 22:17:30 +00:00
41cad291f9
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
93 lines
4.2 KiB
XML
93 lines
4.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<org.thoughtcrime.securesms.ConversationListItem
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="70dp">
|
|
|
|
<FrameLayout android:id="@+id/contact_photo_frame"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerVertical="true"
|
|
android:layout_alignParentLeft="true"
|
|
android:paddingTop="3dp"
|
|
android:paddingBottom="3dp"
|
|
android:paddingLeft="10dp"
|
|
android:paddingRight="10dp"
|
|
android:visibility="visible">
|
|
|
|
<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"
|
|
android:cropToPadding="true"
|
|
android:visibility="gone"
|
|
tools:src="@drawable/ic_contact_picture"
|
|
android:contentDescription="@string/conversation_list_item_view__contact_photo_image"
|
|
android:layout_marginLeft="0dp" />
|
|
</FrameLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="4dip"
|
|
android:layout_marginLeft="4dip"
|
|
android:layout_marginRight="8dip"
|
|
android:layout_marginBottom="4dip"
|
|
android:layout_centerVertical="true"
|
|
android:layout_toRightOf="@id/contact_photo_frame"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:weightSum="1"
|
|
android:gravity="bottom">
|
|
|
|
<org.thoughtcrime.securesms.components.FromTextView
|
|
android:id="@+id/from"
|
|
android:layout_weight="1"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
android:textColor="?attr/conversation_list_item_contact_color"
|
|
android:singleLine="true"
|
|
tools:text="Jules Bonnot"
|
|
android:ellipsize="marquee" />
|
|
|
|
<ImageView android:id="@+id/error"
|
|
android:layout_marginLeft="3dip"
|
|
android:layout_height="match_parent"
|
|
android:layout_width="20sp"
|
|
android:visibility="gone"
|
|
android:src="@drawable/ic_action_warning_red"
|
|
android:contentDescription="@string/conversation_list_item_view__error_alert" />
|
|
|
|
<TextView android:id="@+id/date"
|
|
android:layout_marginLeft="3dip"
|
|
android:layout_height="wrap_content"
|
|
android:layout_width="wrap_content"
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
android:textColor="?attr/conversation_list_item_date_color"
|
|
android:fontFamily="sans-serif-light"
|
|
tools:text="30 mins"
|
|
android:singleLine="true"
|
|
android:layout_gravity="top" />
|
|
</LinearLayout>
|
|
|
|
<TextView android:id="@+id/subject"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
android:textColor="?attr/conversation_list_item_subject_color"
|
|
android:fontFamily="sans-serif-light"
|
|
android:singleLine="true"
|
|
tools:text="Wheels arrive at 3pm flat."
|
|
android:ellipsize="end" />
|
|
|
|
</LinearLayout>
|
|
</org.thoughtcrime.securesms.ConversationListItem>
|