Open hardikbhalodi opened 1 year ago
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
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)
![Screenshot_153452](https://github.com/alexzhirkevich/custom-qr-generator/assets/4948894/165392e3-4f8a-4fa7-aa18-029e80011f70)
Library version 1.6.2 ouput (Correct)![Screenshot_154359](https://github.com/alexzhirkevich/custom-qr-generator/assets/4948894/d83dfcbb-51f2-44c6-adf5-149dafdfacbc)
Quoted issue https://github.com/alexzhirkevich/custom-qr-generator/issues/27#issue-1690411367