Comments (12)
I'll add an interface implementation, let me know if something like
passCodeText.setOnCompleteListener({})
would resolve your problem.
from passcodetext.
@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.
Will add this in the next release and push it asap.
from passcodetext.
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.
from passcodetext.
After adding the listener, callback is getting called 3-4 times.
Can you let me know about the same?
from passcodetext.
Can you show how you've implemented it programmatically? It'll help me understand your problem better.
from passcodetext.
@swapnil1104 Easiest way to reproduce will be your example app, but instead of Toast use Log to verify multiple calls.
from passcodetext.
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.
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.
Will add a fix and push a release this satuday. @aaabidunique
from passcodetext.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passcodetext.