Improve resizing by forcing layout

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-12-29 02:25:58 +01:00
parent b28efa44df
commit 02785b3f9c
2 changed files with 2 additions and 1 deletions

View File

@ -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'

View File

@ -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();
}
}