diff --git a/packages/core/image-source/index.android.ts b/packages/core/image-source/index.android.ts index 224802877..cd4d7938f 100644 --- a/packages/core/image-source/index.android.ts +++ b/packages/core/image-source/index.android.ts @@ -181,13 +181,14 @@ export class ImageSource implements ImageSourceDefinition { const textBounds = new android.graphics.Rect(); paint.getTextBounds(source, 0, source.length, textBounds); - const textWidth = textBounds.width(); - const textHeight = textBounds.height(); + const padding = 1; + const textWidth = textBounds.width() + padding * 2; + const textHeight = textBounds.height() + padding * 2; if (textWidth > 0 && textHeight > 0) { const bitmap = android.graphics.Bitmap.createBitmap(textWidth, textHeight, android.graphics.Bitmap.Config.ARGB_8888); const canvas = new android.graphics.Canvas(bitmap); - canvas.drawText(source, -textBounds.left, -textBounds.top, paint); + canvas.drawText(source, -textBounds.left + padding, -textBounds.top + padding, paint); return new ImageSource(bitmap); }