From 02785b3f9c3986515f2a072485d203b639f28911 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Sat, 29 Dec 2018 02:25:58 +0100 Subject: [PATCH] Improve resizing by forcing layout Signed-off-by: Mario Danic --- app/build.gradle | 2 +- app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 5649086c0..e08cafd4e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -157,7 +157,7 @@ dependencies { compileOnly "org.projectlombok:lombok:1.18.4" annotationProcessor "org.projectlombok:lombok:1.18.4" - implementation 'com.jakewharton:butterknife:9.0.0-rc1' + implementation 'com.jakewharton:butterknife:9.0.0-rc2' annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc1' implementation 'com.github.HITGIF:TextFieldBoxes:1.4.3' diff --git a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java index 9d0fa8b73..8c0d3bc51 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java +++ b/app/src/main/java/com/nextcloud/talk/utils/DisplayUtils.java @@ -96,6 +96,7 @@ public class DisplayUtils { draweeView.getLayoutParams().width = imageInfo.getWidth() > 480 ? 480 : imageInfo.getWidth(); draweeView.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT; draweeView.setAspectRatio((float) imageInfo.getWidth() / imageInfo.getHeight()); + draweeView.requestLayout(); } }