|
|
|
@ -21,6 +21,7 @@ package eu.faircode.email;
|
|
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
|
import android.graphics.Canvas;
|
|
|
|
|
import android.graphics.Rect;
|
|
|
|
|
import android.graphics.drawable.Drawable;
|
|
|
|
|
import android.util.AttributeSet;
|
|
|
|
|
import android.view.View;
|
|
|
|
@ -50,7 +51,9 @@ public class FixedImageView extends androidx.appcompat.widget.AppCompatImageView
|
|
|
|
|
Log.e(new Throwable(Helper.getViewName(this), ex));
|
|
|
|
|
Context context = getContext();
|
|
|
|
|
Drawable d = context.getDrawable(R.drawable.twotone_broken_image_24);
|
|
|
|
|
d.setBounds(getDrawable().getBounds());
|
|
|
|
|
Rect b = getDrawable().getBounds();
|
|
|
|
|
int px = Math.min(b.width(), b.height());
|
|
|
|
|
d.setBounds(0, 0, px, px);
|
|
|
|
|
d.draw(canvas);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|