Skip to content

Commit b412bee

Browse files
v1.9 | Upgraded dependencies
1 parent 7bcdaf7 commit b412bee

File tree

8 files changed

+36
-13
lines changed

8 files changed

+36
-13
lines changed

.idea/jarRepositories.xml

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ repositories {
116116
}
117117
118118
dependencies {
119-
implementation 'com.github.AnupKumarPanwar:ScratchView:1.8'
119+
implementation 'com.github.AnupKumarPanwar:ScratchView:1.9'
120120
}
121121
```
122122

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ android {
2929

3030
dependencies {
3131
implementation fileTree(include: ['*.jar'], dir: 'libs')
32-
implementation 'androidx.appcompat:appcompat:1.3.1'
33-
implementation 'com.google.android.material:material:1.4.0'
34-
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
32+
implementation 'androidx.appcompat:appcompat:1.4.1'
33+
implementation 'com.google.android.material:material:1.5.0'
34+
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
3535
testImplementation 'junit:junit:4.13.2'
3636
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
3737
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
33.6 KB
Loading

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
maven { url 'https://jitpack.io' }
77
}
88
dependencies {
9-
classpath "com.android.tools.build:gradle:7.0.3"
9+
classpath 'com.android.tools.build:gradle:7.0.4'
1010
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1111

1212
// NOTE: Do not place your application dependencies here; they belong

scratchview/build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ android {
99
defaultConfig {
1010
minSdk 21
1111
targetSdk 31
12-
versionCode 1
13-
versionName "1.0"
1412

1513
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1614
consumerProguardFiles "consumer-rules.pro"
@@ -29,8 +27,8 @@ android {
2927
}
3028

3129
dependencies {
32-
implementation 'androidx.appcompat:appcompat:1.3.1'
33-
implementation 'com.google.android.material:material:1.4.0'
30+
implementation 'androidx.appcompat:appcompat:1.4.1'
31+
implementation 'com.google.android.material:material:1.5.0'
3432
testImplementation 'junit:junit:4.13.2'
3533
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
3634
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
@@ -43,7 +41,7 @@ afterEvaluate {
4341
from components.release
4442
groupId = "com.anupkumarpanwar"
4543
artifactId = "scratchview"
46-
version = '1.8'
44+
version = '1.9'
4745
}
4846
}
4947
}

scratchview/src/main/java/com/anupkumarpanwar/scratchview/ScratchView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ public void setRevealListener(IRevealListener listener) {
335335
}
336336

337337
public boolean isRevealed() {
338-
return mRevealPercent >= 0.50;
338+
return mRevealPercent >= 0.33;
339339
}
340340

341341
private void checkRevealed() {

scratchview/src/main/java/com/anupkumarpanwar/utils/BitmapUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public static float getTransparentPixelPercent(Bitmap bitmap) {
6464
int len = array.length;
6565
int count = 0;
6666

67-
for (int i = 0; i < len; i++) {
68-
if (array[i] == 0) {
67+
for (byte b : array) {
68+
if (b == 0) {
6969
count++;
7070
}
7171
}

0 commit comments

Comments
 (0)