drawer: vcard display in the menu's accounts list
This commit adds photo in the drawer's accounts list. Alias is replaced by the
name of the vcard.
Change-Id: Id1c5b4e9b7b2a6bd2b931ac0d87e437bc6d5d4cb
Tuleap: #1279
diff --git a/ring-android/app/src/main/res/layout/item_account.xml b/ring-android/app/src/main/res/layout/item_account.xml
index 871ca8f..65bb628 100644
--- a/ring-android/app/src/main/res/layout/item_account.xml
+++ b/ring-android/app/src/main/res/layout/item_account.xml
@@ -17,18 +17,30 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:padding="16dp">
+ <android.support.v7.widget.AppCompatImageView
+ android:id="@+id/account_photo"
+ android:layout_width="36dp"
+ android:layout_height="36dp"
+ android:layout_centerVertical="true"
+ android:layout_marginEnd="8dp"
+ android:layout_marginRight="8dp"
+ tools:src="@drawable/ic_contact_picture" />
+
<android.support.v7.widget.AppCompatTextView
android:id="@+id/account_alias"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="false"
- android:layout_alignParentStart="true"
+ android:layout_alignParentStart="false"
android:layout_alignParentTop="true"
+ android:layout_toEndOf="@+id/account_photo"
+ android:layout_toRightOf="@+id/account_photo"
android:textAppearance="@style/ListPrimary" />
<android.support.v7.widget.AppCompatTextView
@@ -36,9 +48,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="false"
- android:layout_alignParentStart="true"
+ android:layout_alignParentStart="false"
android:layout_below="@+id/account_alias"
+ android:layout_toEndOf="@+id/account_photo"
android:layout_toLeftOf="@+id/error_indicator"
+ android:layout_toRightOf="@+id/account_photo"
android:layout_toStartOf="@+id/error_indicator"
android:ellipsize="end"
android:maxLines="1"