mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 12:39:58 +01:00
Fix image scaling
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
1b20b63d8c
commit
c3ce9d8b5f
@ -144,7 +144,6 @@ public class NextcloudTalkApplication extends MultiDexApplication implements Lif
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
Fresco.initialize(this, imagePipelineConfig);
|
Fresco.initialize(this, imagePipelineConfig);
|
||||||
FLog.setMinimumLoggingLevel(FLog.VERBOSE);
|
|
||||||
|
|
||||||
new ClosedInterfaceImpl().providerInstallerInstallIfNeededAsync();
|
new ClosedInterfaceImpl().providerInstallerInstallIfNeededAsync();
|
||||||
DeviceUtils.ignoreSpecialBatteryFeatures();
|
DeviceUtils.ignoreSpecialBatteryFeatures();
|
||||||
|
@ -93,7 +93,7 @@ public class DisplayUtils {
|
|||||||
|
|
||||||
private static void updateViewSize(@Nullable ImageInfo imageInfo, SimpleDraweeView draweeView) {
|
private static void updateViewSize(@Nullable ImageInfo imageInfo, SimpleDraweeView draweeView) {
|
||||||
if (imageInfo != null) {
|
if (imageInfo != null) {
|
||||||
draweeView.getLayoutParams().width = imageInfo.getWidth();
|
draweeView.getLayoutParams().width = imageInfo.getWidth() > 480 ? 480 : imageInfo.getWidth();
|
||||||
draweeView.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
|
draweeView.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
|
||||||
draweeView.setAspectRatio((float) imageInfo.getWidth() / imageInfo.getHeight());
|
draweeView.setAspectRatio((float) imageInfo.getWidth() / imageInfo.getHeight());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user