Skip to content

Commit

Permalink
Merge pull request #58 from GoodieBag/bug_fix
Browse files Browse the repository at this point in the history
 Bug fix : #57 and bumped gradle version
  • Loading branch information
Vatican-Cameos authored Sep 4, 2021
2 parents 84f114b + e4ba285 commit 9fa0e53
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
6 changes: 3 additions & 3 deletions example/src/main/res/drawable/example_drawable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true" android:state_focused="true">
<shape android:padding="10dp" android:shape="rectangle">
<stroke android:width="0.5dp" android:color="#FF0000" />
<solid android:color="#FFFF00" />
<stroke android:width="1dp" android:color="#006DCC" />
<solid android:color="#F5F5F5" />
<corners android:radius="4dp" />
</shape>
</item>
<item>
<shape android:padding="10dp" android:shape="rectangle">
<stroke android:width="0.5dp" android:color="#FF0000" />
<stroke android:width="0.5dp" android:color="#000000" />
<solid android:color="#FFF" />
<corners android:radius="4dp" />
</shape>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
</item>
<item android:state_enabled="true" android:state_focused="true">
<shape android:padding="10dp" android:shape="rectangle">
<stroke android:width="0.5dp" android:color="#FF0000" />
<solid android:color="#FFFF00" />
<stroke android:width="1dp" android:color="#006DCC" />
<solid android:color="#F5F5F5" />
<corners android:radius="4dp" />
</shape>
</item>
<item>
<shape android:padding="10dp" android:shape="rectangle">
<stroke android:width="0.5dp" android:color="#FF0000" />
<stroke android:width="0.5dp" android:color="#000000" />
<solid android:color="#FFF" />
<corners android:radius="4dp" />
</shape>
Expand Down
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-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
9 changes: 5 additions & 4 deletions pinview/src/main/java/com/goodiebag/pinview/Pinview.kt
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ class Pinview @JvmOverloads constructor(context: Context, attrs: AttributeSet? =
}
}
if (mPinLength > 0) {
if (lastTagHavingValue < mPinLength - 1) {
currentFocus = editTextList[lastTagHavingValue + 1]
} else {
currentFocus = editTextList[mPinLength - 1]
if (lastTagHavingValue == mPinLength - 1) {
currentFocus = editTextList[mPinLength - 1]
if (inputType == InputType.NUMBER || mPassword) {
this.finalNumberPin = true
Expand Down Expand Up @@ -383,7 +382,9 @@ class Pinview @JvmOverloads constructor(context: Context, attrs: AttributeSet? =
finalNumberPin = true
}
} else if (charSequence.isEmpty()) {

if(indexOfCurrentFocus < 0){
return
}
val currentTag = indexOfCurrentFocus
this.mDelPressed = true

Expand Down

0 comments on commit 9fa0e53

Please sign in to comment.