From f9939ea2036c6a1ce43dcdaba3e4e880f14c4c1e Mon Sep 17 00:00:00 2001 From: Chahat Gupta Date: Fri, 30 Nov 2018 17:56:05 +0530 Subject: [PATCH] Update README.md --- qrview/README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/qrview/README.md b/qrview/README.md index 8cce286..1910e89 100644 --- a/qrview/README.md +++ b/qrview/README.md @@ -10,6 +10,11 @@ Say hi to QRView! A custom View that draws QR codes on the screen easily and eff * **Flexible:** Can generate QR codes directly from XML attributes * **Customizable:** Can play around with colours, error correction levels and more +## Demo Video + + + ## Installation ### Gradle @@ -94,6 +99,31 @@ Add the dependency .build(); // required: always call build() after adding all methods and listener ``` +## Attributes and methods + +### XML + +```xml +app:QR_data +app:QR_size +app:QR_errorCorrectionLevel +app:QR_foregroundColor +app:QR_backgroundColor +``` + +### Java + +```java +setData(String data) // sets the data in QR (required) +setSize(int size) // sets the dimensions of QR in px +setSize(int size, QRParams param) // sets the dimensions of QR in px or dp +setErrorCorrectionLevel(ErrorCorrection level) // sets the error correction level in QR +setQRForegroundColor(int color) // sets the foreground color of QR +setQRBackgroundColor(int color) // sets the background color of QR +addListener(QRViewListener listener) // sets a listener to monitor progress of QR generation +build() // builds/rebuilds the QR with provided params (required) +``` + ## Release History * 0.1.0