Simplifications

This commit is contained in:
M66B
2022-01-10 10:58:41 +01:00
parent 66eba808f0
commit 6480f719ab
2 changed files with 4 additions and 5 deletions

View File

@@ -48,8 +48,8 @@ public class FixedImageButton extends AppCompatImageButton {
super.onDraw(canvas);
} catch (RuntimeException ex) {
Log.e(new Throwable(Helper.getViewName(this), ex));
Context context = getContext();
Drawable d = context.getDrawable(R.drawable.twotone_broken_image_24);
Drawable d = getContext().getDrawable(R.drawable.twotone_broken_image_24);
Rect b = getDrawable().getBounds();
int px = Math.min(b.width(), b.height());
d.setBounds(0, 0, px, px);