فهرست منبع

fix to show missing preview files.

solution: SimpleDraweeView does not support wrap_content for layout_width or layout_height attributes.
see https://frescolib.org/docs/using-simpledraweeview.html

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 4 سال پیش
والد
کامیت
1296b8854e

+ 1 - 0
CHANGELOG.md

@@ -24,6 +24,7 @@ Types of changes can be: Added/Changed/Deprecated/Removed/Fixed/Security
 - remove all "chat via"-links from phonebook when sync is disabled
 - fix to show avatars for incoming pictures in group chats (@starypatyk)
 - do not allow selecting files in files browser that are not allowed to be reshared
+- fix to show all file previews
 
 ## [11.1.0] - 2021-03-12
 ### Added

+ 5 - 3
app/src/main/res/layout/item_custom_incoming_preview_message.xml

@@ -58,11 +58,13 @@
             app:layout_alignSelf="flex_start"
             android:adjustViewBounds="true">
 
+            <!-- SimpleDraweeView does not support wrap_content for layout_width or layout_height attributes! -->
             <com.facebook.drawee.view.SimpleDraweeView
                 android:id="@id/image"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:scaleType="fitCenter"
+                android:layout_width="100dp"
+                android:layout_height="100dp"
+                android:scaleType="fitStart"
+                app:roundedCornerRadius="6dp"
                 tools:src="@drawable/ic_call_black_24dp" />
 
             <ProgressBar

+ 5 - 3
app/src/main/res/layout/item_custom_outcoming_preview_message.xml

@@ -50,11 +50,13 @@
             app:layout_alignSelf="flex_start"
             android:adjustViewBounds="true">
 
+            <!-- SimpleDraweeView does not support wrap_content for layout_width or layout_height attributes! -->
             <com.facebook.drawee.view.SimpleDraweeView
                 android:id="@id/image"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:scaleType="fitCenter"
+                android:layout_width="100dp"
+                android:layout_height="100dp"
+                android:scaleType="fitEnd"
+                app:roundedCornerRadius="6dp"
                 tools:src="@drawable/ic_call_black_24dp" />
 
             <ProgressBar