diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-11-04 19:59:20 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-11-04 19:59:20 +0300 |
commit | 27a07f62966fbd22aa828acb3c386e9a8cbfcfbd (patch) | |
tree | 6610631324f70032be6a4c313e4941570c465c48 /app/src/main/res | |
parent | a78b0f8935d90870527b3e75ed27c4f35349972f (diff) |
Provide fallback initials for contacts wtihout avatars
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/fragment_card_edit_tab_attachments.xml | 1 | ||||
-rw-r--r-- | app/src/main/res/layout/item_picker_user.xml | 31 |
2 files changed, 25 insertions, 7 deletions
diff --git a/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml b/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml index 63d1657f2..1958e53da 100644 --- a/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml +++ b/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml @@ -61,6 +61,7 @@ <View android:layout_width="@dimen/spacer_4x" android:layout_height="@dimen/spacer_1hx" + android:layout_alignParentBottom="true" android:layout_centerInParent="true" android:background="@color/bg_info_box" /> </RelativeLayout> diff --git a/app/src/main/res/layout/item_picker_user.xml b/app/src/main/res/layout/item_picker_user.xml index 1e1df9595..a1e35cefc 100644 --- a/app/src/main/res/layout/item_picker_user.xml +++ b/app/src/main/res/layout/item_picker_user.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout 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="wrap_content" @@ -8,14 +7,32 @@ android:orientation="horizontal" android:padding="@dimen/spacer_1x"> - <ImageView - android:id="@+id/avatar" + <FrameLayout android:layout_width="@dimen/avatar_size" android:layout_height="@dimen/avatar_size" - android:layout_marginEnd="10dp" - android:contentDescription="@null" - app:srcCompat="@drawable/ic_person_grey600_24dp" - tools:src="@tools:sample/avatars" /> + android:layout_gravity="center" + android:layout_marginEnd="10dp"> + + <ImageView + android:id="@+id/avatar" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:contentDescription="@null" + tools:background="@color/board_default_color" /> + + <TextView + android:id="@+id/initials" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" + android:textColor="@android:color/white" + android:textSize="20dp" + android:visibility="gone" + tools:ignore="SpUsage" + tools:text="G" + tools:visibility="visible" /> + + </FrameLayout> <LinearLayout android:layout_width="wrap_content" |