From 772421f20dea723d90b2eb417284fdb1a01ba979 Mon Sep 17 00:00:00 2001 From: Sinofine Lotusie Date: Mon, 27 Feb 2023 17:28:01 +0800 Subject: [PATCH] fix image scaling of no bubble mode --- .../java/im/vector/app/features/media/ImageContentRenderer.kt | 1 + vector/src/main/res/layout/view_url_preview.xml | 2 +- vector/src/main/res/layout/view_url_preview_sc.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt b/vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt index 891dfa652a..c2cc94b37e 100644 --- a/vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt +++ b/vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt @@ -117,6 +117,7 @@ class ImageContentRenderer @Inject constructor( */ GlideApp.with(imageView) .load(imageUrl) + .fitCenter() .listener(object: RequestListener { override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { Timber.e("Rendering url $imageUrl failed: $e") diff --git a/vector/src/main/res/layout/view_url_preview.xml b/vector/src/main/res/layout/view_url_preview.xml index e9774207ca..380a13a34a 100644 --- a/vector/src/main/res/layout/view_url_preview.xml +++ b/vector/src/main/res/layout/view_url_preview.xml @@ -99,4 +99,4 @@ - \ No newline at end of file + diff --git a/vector/src/main/res/layout/view_url_preview_sc.xml b/vector/src/main/res/layout/view_url_preview_sc.xml index f1b2de5955..b640126ba3 100644 --- a/vector/src/main/res/layout/view_url_preview_sc.xml +++ b/vector/src/main/res/layout/view_url_preview_sc.xml @@ -86,4 +86,4 @@ app:tint="?vctr_content_secondary" tools:ignore="MissingPrefix" /> - \ No newline at end of file +