Code Monkey home page Code Monkey logo

Comments (12)

swapnil1104 avatar swapnil1104 commented on August 27, 2024 1

I'll add an interface implementation, let me know if something like
passCodeText.setOnCompleteListener({})
would resolve your problem.

from passcodetext.

aaabidunique avatar aaabidunique commented on August 27, 2024 1

@swapnil1104 I think that will do the job.
My only requirement is to auto submit the request if user typed all the numbers in OTP field.

P.S
Add the OTP value in the callback as well.

from passcodetext.

swapnil1104 avatar swapnil1104 commented on August 27, 2024 1

Will add this in the next release and push it asap.

from passcodetext.

swapnil1104 avatar swapnil1104 commented on August 27, 2024 1

I've added this feature to 0.1.3 release, do check it out, you can refer to the documentation.
Feel free to ask, if you have any other queries.

@aaabidunique

from passcodetext.

aaabidunique avatar aaabidunique commented on August 27, 2024

After adding the listener, callback is getting called 3-4 times.
Can you let me know about the same?

from passcodetext.

swapnil1104 avatar swapnil1104 commented on August 27, 2024

Can you show how you've implemented it programmatically? It'll help me understand your problem better.

from passcodetext.

aaabidunique avatar aaabidunique commented on August 27, 2024

@swapnil1104 Easiest way to reproduce will be your example app, but instead of Toast use Log to verify multiple calls.

from passcodetext.

swapnil1104 avatar swapnil1104 commented on August 27, 2024

Got it. Will fix this ASAP.

Edit: Unable to replicate the issue in the example app. Working is as it should be.

It could be that in your case onDraw is being invoked which triggers the callback, if you could give out bit more details it'll be helpful in rectifying the issue.
@aaabidunique

from passcodetext.

aaabidunique avatar aaabidunique commented on August 27, 2024

Got it. Will fix this ASAP.

Edit: Unable to replicate the issue in the example app. Working is as it should be.

It could be that in your case onDraw is being invoked which triggers the callback, if you could give out bit more details it'll be helpful in rectifying the issue.
@aaabidunique

As I understand onDraw will be called multiple times based on view repaint, refresh rate, view changes in the hosted activity/fragment.
I think onDraw may not be the best place for complete listener.
Maybe something like text change listener might help but I may be wrong.
FYI If you need specific detail let me know.

from passcodetext.

swapnil1104 avatar swapnil1104 commented on August 27, 2024

Will add a fix and push a release this satuday. @aaabidunique

from passcodetext.

aaabidunique avatar aaabidunique commented on August 27, 2024

After thinking @swapnil1104, I think it may better for the user of library to implement the text watcher rather than you implementing it.
You can revert to your old codebase before complete listener and release the final version.
I will implement textwatcher at my side.
P.S
You can close this issue.

from passcodetext.

swapnil1104 avatar swapnil1104 commented on August 27, 2024

I'm sorry I have been unable to implement a bug-free solution to what your problem statement is.
Been busy with things outside.

Implementing a TextWatcher would be quite simple as well since I'm extending the EditText class.

If that resolves your issue, please go ahead with this. I'll also implement an error-free implementation of the use-case.
Thanks.

from passcodetext.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.