Skip to content

Commit 8372a31

Browse files
committed
fixed the empty and full drawables not being drawn correctly on APIs prior to 21
1 parent 48192ba commit 8372a31

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

passcodeviewlib/src/main/java/in/arjsna/passcodeview/PassCodeView.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,14 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
326326
*/
327327
private void setFilledCount(int count) {
328328
filledCount = count > digits ? digits : count;
329-
invalidate(drawableStartX,
329+
/*invalidate(drawableStartX,
330330
drawableStartX,
331331
drawableStartX + getMeasuredWidth(),
332-
drawableStartY + getMeasuredHeight());
332+
drawableStartY + getMeasuredHeight());*/
333+
/* The coordinates passed to `invalidate` method above is wrong
334+
which makes the View not be drawn correctly
335+
hence calling the default invalidate method */
336+
invalidate();
333337
}
334338

335339
@Override

0 commit comments

Comments
 (0)