custom-qr-generator
custom-qr-generator copied to clipboard
Highlight anchor elements for better recognition seems break in Library version 2.0.0-alpha01
Library version 'com.github.alexzhirkevich:custom-qr-generator:2.0.0-alpha01'
Code Snippet QrVectorOptions.Builder options =new QrVectorOptions.Builder()... options.setAnchorsHighlighting(new QrHighlighting(HighlightingType.Default.INSTANCE, HighlightingType.Default.INSTANCE, HighlightingType.None.INSTANCE, 0.6f));
Library version 2.0.0 -alpha01 ouput (Alpha not applying)
Library version 1.6.2 ouput (Correct)
Quoted issue https://github.com/alexzhirkevich/custom-qr-generator/issues/27#issue-1690411367
you have to add alpha manually to the color. alpha paramter will be removed. color parameter will be added to Default highlighting. For now you can use styled one with default arguments and set color to transparent white
I tried that way here is code snippet
HighlightingType type=new HighlightingType.Styled(null,getQRVectorColor(Color.parseColor("#66ffffff")));
options.setAnchorsHighlighting(new QrHighlighting(type,
type, HighlightingType.None.INSTANCE, 0.6f));
here is Output, getting some margin in version eye
Use elementShape from here https://github.com/alexzhirkevich/custom-qr-generator/issues/38#issuecomment-1633356526 and create frame for it with the size of 5, not 7
Or just use stable version
Version stable 'com.github.alexzhirkevich:custom-qr-generator:1.6.2'
With code snippet alpha inside color
HighlightingType type=new HighlightingType.Styled(null,getQRVectorColor(Color.parseColor("#66ffffff")));
options.setAnchorsHighlighting(new QrHighlighting(type,
type, HighlightingType.None.INSTANCE, 0.6f));
with old code snippet alpha as separate parameter options.setAnchorsHighlighting(new QrHighlighting(HighlightingType.Default.INSTANCE, HighlightingType.Default.INSTANCE, HighlightingType.None.INSTANCE, 0.6f));
I mean use it how you have used it before, without new code snippet. I'll fix alpha version soon
@alexzhirkevich new alpha is fixed?
Hello. Can I ask how to create a QR code like this? Can you guide me? @hardikbhalodi @alexzhirkevich