Fix thumbnailview 404 padding centering

filtering
Floens 10 years ago
parent 315f95072f
commit 99615817bf
  1. 6
      Clover/app/src/main/java/org/floens/chan/ui/view/ThumbnailView.java

@ -157,9 +157,9 @@ public class ThumbnailView extends View implements ImageLoader.ImageListener {
Rect bounds = new Rect();
textPaint.getTextBounds(errorText, 0, errorText.length(), bounds);
float x = (getWidth() - bounds.width()) / 2;
float y = getHeight() - (getHeight() - bounds.height()) / 2;
canvas.drawText(errorText, x, y, textPaint);
float x = (getWidth() - getPaddingLeft() + getPaddingRight() - bounds.width()) / 2;
float y = getHeight() - getPaddingTop() - getPaddingBottom() - (getHeight() - bounds.height()) / 2;
canvas.drawText(errorText, getPaddingLeft() + x, getPaddingTop() + y, textPaint);
canvas.restore();
} else {

Loading…
Cancel
Save