Ver Fonte

add placeholder image to avatar for profile view

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger há 3 anos atrás
pai
commit
a47bd5564e
1 ficheiros alterados com 7 adições e 4 exclusões
  1. 7 4
      app/src/main/res/layout/controller_profile.xml

+ 7 - 4
app/src/main/res/layout/controller_profile.xml

@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--  Nextcloud Android client application
+<?xml version="1.0" encoding="utf-8"?>
+<!--  Nextcloud Android client application
 
   Copyright (C) 2017-2021 Andy Scherzinger
   Copyright (C) 2017 Nextcloud
@@ -18,6 +19,7 @@
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:fresco="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
@@ -34,11 +36,12 @@
             android:layout_width="@dimen/avatar_size_big"
             android:layout_height="@dimen/avatar_size_big"
             android:layout_centerHorizontal="true"
-            android:layout_marginStart="16dp"
-            android:layout_marginTop="16dp"
+            android:layout_marginTop="@dimen/standard_margin"
+            android:src="@drawable/account_circle_96dp"
             android:transitionName="userAvatar.transitionTag"
             app:roundAsCircle="true"
-            tools:src="@tools:sample/avatars[0]" />
+            fresco:failureImage="@drawable/account_circle_96dp"
+            fresco:placeholderImage="@drawable/account_circle_96dp" />
 
         <androidx.emoji.widget.EmojiTextView
             android:id="@+id/userinfo_fullName"