mukeshsolanki / android-otpview-pinview

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

How to Clear All Fields #153

Closed lsamaria closed 1 year ago

lsamaria commented 1 year ago

If there is an error verification after the user enters the OTP fields, how can automatically clear all of the otp fields so that the user can start over. For a fake example

binding.otpView.clearAllFields()

lsamaria commented 1 year ago

Here is the answer:

otpView.setText("")