DavidPizarro / PinView

A Pin view widget for Android
Apache License 2.0
286 stars 60 forks source link

setOnCompleteListener executes before password masking #8

Open adityagoel19 opened 7 years ago

adityagoel19 commented 7 years ago

Hi,

Great work on this! I just have a small problem which may be due to my lack of understanding of use of this library. I have a pinview with 4 boxes, 1 number each and setMaskPassword is enabled. I have added a setOnCompleteListener on the pinview and it fires as expected.

However, I am having trouble with password masking which is not working. Let me explain the observed behavior.

Upon entering first digit, the digit is not masked and the number is displayed on the screen. Same with entering second and third digits. Upon entering fourth digit, the setOnCompleteListener callback is called and then after a second all four boxes are masked. I am guessing when setOnCompleteListener finishes, the masking is done.

Please help.

adityagoel19 commented 7 years ago

<com.dpizarro.pinview.library.PinView android:layout_width="340dp" android:layout_height="wrap_content" android:paddingStart="20dp" android:paddingEnd="20dp" android:background="@color/white" app:numberPinBoxes="4" app:password="true" app:deleteOnClick="true" app:keyboardMandatory="false" app:nativePinBox="false" android:layout_marginBottom="20dp" android:id="@+id/home_pincodeview"/>

adityagoel19 commented 7 years ago

home_pincodeview.setNumberCharacters(1); home_pincodeview.setMaskPassword(true);