File tree Expand file tree Collapse file tree 5 files changed +25
-12
lines changed
src/main/java/com/andrognito/pinlockview Expand file tree Collapse file tree 5 files changed +25
-12
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ dependencies {
2424
2525 implementation project(' :pinlockview' )
2626
27- implementation ' androidx.appcompat:appcompat:1.1.0 '
28- implementation ' com.google.android.material:material:1.2.0-alpha04 '
27+ implementation ' androidx.appcompat:appcompat:1.3.1 '
28+ implementation ' com.google.android.material:material:1.4.0 '
2929
30- testImplementation ' junit:junit:4.12 '
30+ testImplementation ' junit:junit:4.13.2 '
3131}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ buildscript {
66 jcenter()
77 }
88 dependencies {
9- classpath ' com.android.tools.build:gradle:3.5.3 '
9+ classpath ' com.android.tools.build:gradle:3.5.4 '
1010 classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
1111 classpath ' com.github.dcendents:android-maven-gradle-plugin:1.4.1'
1212 // NOTE: Do not place your application dependencies here; they belong
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ android {
3131 defaultConfig {
3232 minSdkVersion 21
3333 targetSdkVersion 29
34- versionCode 7
35- versionName " 2.1.5 "
34+ versionCode 8
35+ versionName " 2.1.6 "
3636 }
3737 buildTypes {
3838 release {
@@ -45,10 +45,10 @@ android {
4545dependencies {
4646 implementation fileTree(dir : ' libs' , include : [' *.jar' ])
4747
48- implementation ' androidx.appcompat:appcompat:1.1.0 '
49- implementation ' com.google.android.material:material:1.2.0-alpha04 '
48+ implementation ' androidx.appcompat:appcompat:1.3.1 '
49+ implementation ' com.google.android.material:material:1.4.0 '
5050
51- testImplementation ' junit:junit:4.12 '
51+ testImplementation ' junit:junit:4.13.2 '
5252}
5353
5454apply from : ' https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
Original file line number Diff line number Diff line change 33import android .content .Context ;
44import android .graphics .PorterDuff ;
55import android .graphics .Rect ;
6+ import android .os .SystemClock ;
67import android .util .TypedValue ;
78import android .view .LayoutInflater ;
89import android .view .MotionEvent ;
@@ -179,8 +180,20 @@ public NumberViewHolder(final View itemView) {
179180 super (itemView );
180181 mNumberButton = itemView .findViewById (R .id .button );
181182 mNumberButton .setOnClickListener (new View .OnClickListener () {
183+ private static final long MIN_CLICK_INTERVAL = 500L ;
184+ private long lastClickTime = 0L ;
185+
182186 @ Override
183187 public void onClick (View v ) {
188+ long currentClickTime = SystemClock .uptimeMillis ();
189+ long elapsedTime = currentClickTime - lastClickTime ;
190+
191+ lastClickTime = currentClickTime ;
192+
193+ if (elapsedTime <= MIN_CLICK_INTERVAL ) {
194+ return ;
195+ }
196+
184197 if (mOnNumberClickListener != null ) {
185198 mOnNumberClickListener .onNumberClicked ((Integer ) v .getTag ());
186199 }
Original file line number Diff line number Diff line change @@ -73,9 +73,9 @@ public void onNumberClicked(int keyValue) {
7373 }
7474
7575 } else {
76- if (mPinLockListener != null ) {
77- mPinLockListener .onComplete (mPin );
78- }
76+ // if (mPinLockListener != null) {
77+ // mPinLockListener.onComplete(mPin);
78+ // }
7979 }
8080 }
8181 }
You can’t perform that action at this time.
0 commit comments