mukeshsolanki / android-otpview-pinview

A custom view to enter otp of different sizes used usually in cases of authentication.
MIT License
713 stars 206 forks source link

Delete Issue #52

Closed riddhishahts closed 5 years ago

riddhishahts commented 5 years ago

Hi, your lib is good but I am not getting any call back when the user has deleted all the otp content. You should send the call back on your setOtpCompletionListener.

Try to add OTP and then backspace/Delete them. You won't get any call back from it. I want to check that user has entered OTP or not.

mukeshsolanki commented 5 years ago

you can simply do otpView.getText() to get the text the user has entered. If it does not match the size then the user has not entered it.

mukeshsolanki commented 5 years ago

That should solve the problem let me know otherwise @riddhishahts if there is any specific reason as to why you need a listener for that.

umeshkumar1990 commented 5 years ago

I need to disable verify button if otpview is not completed. On complete I enable verify button but in case if user completed otpview and delete some digits i need to disable it again then what to do.

mukeshsolanki commented 5 years ago

you can use an rx observable to do that. It would simply not make sense to add the incomplete listener since it would constantly keep firing everytime you enter a value.