mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 00:23:09 +02:00
Fixed showing image place holders
This commit is contained in:
@@ -1748,7 +1748,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
public Drawable getDrawable(String source) {
|
||||
Drawable image = HtmlHelper.decodeImage(source, message.id, show_images, tvBody);
|
||||
|
||||
float width = tvBody.getWidth();
|
||||
ConstraintLayout.LayoutParams params =
|
||||
(ConstraintLayout.LayoutParams) tvBody.getLayoutParams();
|
||||
float width = context.getResources().getDisplayMetrics().widthPixels
|
||||
- params.leftMargin - params.rightMargin;
|
||||
if (image.getIntrinsicWidth() > width) {
|
||||
float scale = width / image.getIntrinsicWidth();
|
||||
image.setBounds(0, 0,
|
||||
|
||||
Reference in New Issue
Block a user