Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 25 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,34 @@ logo.setScale(0.3f); // scale for the logo in the QR code
logo.setClippingRect(new Rect(0, 0, 200, 200)); // crop the logo image before applying it to the QR code
```

### 5. Render!
### 5 Hey! I want QrCode different Versions (say version 6) and I want Customized Positions

```kotlin
var renderOption = RenderOption()
// version
renderOption.qrCodeVersion = 6 // or set the version you need
// rounded position
renderOption.isCustomPositions = true
val color = Color()
color.light = -0x1
color.dark = -0x1000000
color.background = -0x1
color.auto = false

color.topLeftColor = ResourcesCompat.getColor(this.resources, R.color.top_left, null)
color.topRigntColor = ResourcesCompat.getColor(this.resources, R.color.top_right, null)
color.bottomLeftColor = ResourcesCompat.getColor(this.resources, R.color.bottom_left, null)

renderOption.color = color
```

output:

<img src="art/custom-qrcode-v6.jpg" width="400">

Please see [fun buildNiceQrCode(link: String)](https://github.com/fahimfarhan/AwesomeQRCode/blob/6e1132f8c683d4d9f0c2c13ac1fc8cf7714b8fd0/qrcodedemo/src/main/java/app/soumicslab/qrcodedemo/StartActivity.kt#L131) for the complete code.

### 6. Render!

Meet the magical renderer.

Expand Down
Binary file added art/custom-qrcode-v6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.70'
ext.kotlin_version = '1.5.10'
repositories {
google()
jcenter()
maven { url "http://dl.bintray.com/waynejo/maven" }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath "com.android.tools.build:gradle:7.1.0-alpha01"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
systemProp.http.proxyHost=127.0.0.1
org.gradle.jvmargs=-Xmx1536m
systemProp.http.proxyPort=8123
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
10 changes: 5 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 28
buildToolsVersion '28.0.2'
compileSdkVersion 30
buildToolsVersion '30.0.2'

defaultConfig {
minSdkVersion 14
targetSdkVersion 28
targetSdkVersion 30
versionCode 10
versionName "1.2.0"

Expand All @@ -32,9 +32,9 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.zxing:core:3.2.1'
implementation 'com.google.zxing:core:3.4.1'
implementation 'com.waynejo:androidndkgif:0.3.3'
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13.2'
}
repositories {
mavenCentral()
Expand Down
Loading