mukeshsolanki / android-otpview-pinview

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

setListener is not found in V-2.0.3 #73

Closed Jenifer-Ramsingh closed 4 years ago

Jenifer-Ramsingh commented 5 years ago

Subject of the issue

after integration the V-2.0.3 the otpView.setListener(new OnOtpCompletionListener() { @Override public void onOtpCompleted(String otp) { // do Stuff Log.d("onOtpCompleted=>", otp); } });

says

error: cannot find symbol otpView.setListener(new OnOtpCompletionListener() { ^

yaroslavsudnik commented 5 years ago

@Jenifer-Ramsingh please use setOtpCompletionListener instead of setListener

private OtpView otpView;
 otpView = findViewById(R.id.otp_view);
 otpView.setOtpCompletionListener(new OnOtpCompletionListener() {
   @Override public void onOtpCompleted(String otp) {

     // do Stuff
     Log.d("onOtpCompleted=>", otp);
   }
 });
Jenifer-Ramsingh commented 5 years ago

Thanks @yaroslavsudnik now working as expected.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This has been closed with no activity