Comments (6)
ill look into this. till then see if you can use the non ktx version in the project
from otpview.
i am using this
otpTextView.otpListener = object : OTPListener {
override fun onInteractionListener() {
otpTextView.resetState()
}
override fun onOTPComplete(otp: String) {
}
}
and it is working fine
from otpview.
can you share me more of your code and use case and lets try to solve this
from otpview.
otpTextView.otpListener = object : OTPListener {
override fun onInteractionListener() {
otpTextView.resetState()
}
override fun onOTPComplete(otp: String) {
}
}
By using this method control is not triggered and came to any of these overridden methods.
Whereas if I implement OTPListener and these two methods in .kt file
override fun onInteractionListener() {}
override fun onOTPComplete(otp: String) {
if (otp.equals("1234", true)) { //Hard codes example OTP as 1234
otpView.showSuccess() // Added a debbuger point here
} else {
otpView.showError() // And a debbuger point here
}
}
Then control is pointing to these methods but not entering in if condition or its else, it just retun without any errror message.
P.S. I am using Android Studio SDK 29, with JDK 8 with a setting of Support Instant App.
from otpview.
ok let me test
from otpview.
Hi,
I had made it work by setting the different background drawable for each error/success/neutral through program instead of assigning it through XML and using
showSuccess()
or
showError()
And do appreciate your approach to help your OTP View is very useful. Thank you very much for making it and sharing it in the public domain.
from otpview.
Related Issues (20)
- hide_otp_drawable settings is not described
- copy paste not working HOT 2
- Error inflating class in.aabhasjindal.otptextview.OtpTextView
- android:textColor property not working HOT 1
- Error inflating class in.aabhasjindal.otptextview.OtpTextView HOT 1
- is the lib only support take a number as input ?
- App crashing when app:hide_otp is set to "true"
- how to give box borders, as in th ebackground is white but the borders of the box are red?
- Can not find com.github.aabhasr1:OtpView:v1.1.2-ktx HOT 1
- Input Type not change
- How to change the length Programatically
- app:text_typeface is not working at all HOT 1
- Can i change the lenght programmatically?
- Unable to enter OTP HOT 1
- Language specific Keyboard not supported HOT 1
- Fill not working on Android 13 running on Samsung 22 HOT 1
- [NotAnIssue][HelpWanted] How can i toggle the visibility of the numbers? HOT 1
- Disable Click HOT 1
- How to make otp text visible and hide using eye icon?
- Error inflating class
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 otpview.