kenglxn / QRGen

a simple QRCode generation api for java built on top ZXING
http://glxn.net/2012/03/10/qrgen-a-small-wrapper-on-top-of-zxing-for-generating-qrcodes-in-java
1.49k stars 299 forks source link

ColorRes option #131

Closed TurKurT656 closed 3 years ago

TurKurT656 commented 4 years ago

TnQ for this lib, How we can set a color from color res id or color attr? like this: .withColor(ContextCompat.getColor(getActivity(), R.color.colorPrimary))

kenglxn commented 4 years ago

not sure. QRGen is just a wrapper on top of ZXING(https://github.com/zxing/zxing) If it can be done in zxing, then we should be able to do it with QRGen as well. Try checking the docs of zxing.

TurKurT656 commented 4 years ago

is there any method that convert that to 0xAARRGGBB format?

Dagzo commented 4 years ago

I think you can set a color from res id like below. Please try it.

.withColor(ContextCompat.getColor(getActivity(), R.color.colorPrimary), Color.WHITE)