Flow images

This commit is contained in:
M66B
2019-05-03 12:21:52 +02:00
parent 73a2b149e8
commit b454409c10
3 changed files with 16 additions and 71 deletions

View File

@@ -2760,18 +2760,7 @@ public class FragmentCompose extends FragmentBase {
new Html.ImageGetter() {
@Override
public Drawable getDrawable(String source) {
Drawable image = HtmlHelper.decodeImage(source, id, show_images, tvReference);
float width = context.getResources().getDisplayMetrics().widthPixels -
Helper.dp2pixels(context, 12); // margins;
if (image.getIntrinsicWidth() > width) {
float scale = width / image.getIntrinsicWidth();
image.setBounds(0, 0,
Math.round(image.getIntrinsicWidth() * scale),
Math.round(image.getIntrinsicHeight() * scale));
}
return image;
return HtmlHelper.decodeImage(source, id, show_images, tvReference);
}
},
null);