Skip to content

Remove border from QR-Code #26

@mariusgrams

Description

@mariusgrams

Hi guys,

I am creating a QR-Code with a text and put it in a imageView. Here is my code:

 final String value = "Thats a test value";
 QRGEncoder qrgEncoder = new QRGEncoder(value, null, QRGContents.Type.TEXT, 1024);
 qrgEncoder.setColorBlack(Color.BLACK);
 qrgEncoder.setColorWhite(Color.WHITE);
 final Bitmap bitmap = qrgEncoder.getBitmap();
 ivQrCode.setImageBitmap(bitmap);

But my generated QR-Code has a border, in my case white. Can I remove this border?
I have already tried to set the color to transparent but then the ImageView still has exactly the same margin to the sides.
I need to remove the border before generating a bitmap.

See here:
image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions