Comments (11)
@altaf2892 May I ask why you need to exclude app:otp="1234"
? The documentation says to keep it included.
from android-otpview-pinview.
it shows otpview filled with 1234 to user for the first time .so
from android-otpview-pinview.
@altaf2892 are you using the latest version of the lib? the example app seems to be working fine
from android-otpview-pinview.
yes mukesh, i m using latest version ... currently i have managed by above code implementation but.. i think it should be works with blanks from xml implementation or also should be worked if i ignore this codeline in xml..
from android-otpview-pinview.
just to make sure the your using the version 1.1.0
right? I'm unable to reproduce the issue can you try again and let me know
from android-otpview-pinview.
@altaf2892 any update?
from android-otpview-pinview.
i am using this. implementation 'com.github.mukeshsolanki:android-otpview-pinview:1.0.6'
and code implementation is
otpView.setListener(new OtpListener() { @Override public void onOtpEntered(String s) { if (otpView.hasValidOTP()) { verifyOtp(s); } } });
and xml implementation
`<com.mukesh.OtpView
android:id="@+id/otp_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/margin_30dp"
android:inputType="number"
android:textColor="@color/login"
app:length="4"
app:otp=" "
android:background="@color/white">
</com.mukesh.OtpView>`
in xml margin top and color are from string that's why showing Quotes here
from android-otpview-pinview.
That bug was fixed in 1.1.0
can you please update and test @altaf2892
from android-otpview-pinview.
Otp Size is different from the OtpView size at com.mukesh.OtpView.setOTP(OtpView.java:98) at
same error
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.pharma.app/com.pharma.app.activities.OtpVerification}: android.view.InflateException: Binary XML file line #66: Binary XML file line #66: Error inflating class com.mukesh.OtpView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2760) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2821) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:181) at android.app.ActivityThread.main(ActivityThread.java:6295) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:793) Caused by: android.view.InflateException: Binary XML file line #66: Binary XML file line #66: Error inflating class com.mukesh.OtpView Caused by: android.view.InflateException: Binary XML file line #66: Error inflating class com.mukesh.OtpView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:654) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:832) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772) at android.view.LayoutInflater.rInflate(LayoutInflater.java:903) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:866) at android.view.LayoutInflater.rInflate(LayoutInflater.java:906) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:866) at android.view.LayoutInflater.rInflate(LayoutInflater.java:906) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:866) at android.view.LayoutInflater.inflate(LayoutInflater.java:524) at android.view.LayoutInflater.inflate(LayoutInflater.java:432) at android.view.LayoutInflater.inflate(LayoutInflater.java:383) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.pharma.app.activities.OtpVerification.onCreate(OtpVerification.java:52) at android.app.Activity.performCreate(Activity.java:6862) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1125) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2713) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2821) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:181) at android.app.ActivityThread.main(ActivityThread.java:6295) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:793) Caused by: java.lang.IllegalArgumentException: Otp Size is different from the OtpView size at com.mukesh.OtpView.setOTP(OtpView.java:98) at com.mukesh.OtpView.generateViews(OtpView.java:166) at com.mukesh.OtpView.styleEditTexts(OtpView.java:111) at com.mukesh.OtpView.init(OtpView.java:50) at com.mukesh.OtpView.<init>(OtpView.java:40) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:654) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:832) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772) at android.view.LayoutInflater.rInflate(LayoutInflater.java:903) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:866) at android.view.LayoutInflater.rInflate(LayoutInflater.java:906) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:866) at android.view.LayoutInflater.rInflate(LayoutInflater.java:906) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:866) at android.view.LayoutInflater.inflate(LayoutInflater.java:524) at android.view.LayoutInflater.inflate(LayoutInflater.java:432) at android.view.LayoutInflater.inflate(LayoutInflater.java:383) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.pharma.app.activities.OtpVerification.onCreate(OtpVerification.java:52) at android.app.Activity.performCreate(Activity.java:6862) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1125) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2713) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2821) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:181) at android.app.ActivityThread.main(ActivityThread.java:6295) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:793)
from android-otpview-pinview.
the issue is app:length="4" app:otp=" "
you are assigning a length of 4 and setting the text to ""
which is wrong. Please refer the example app for correct implementation
from android-otpview-pinview.
@altaf2892 any update on this?
from android-otpview-pinview.
Related Issues (20)
- Anyway to separate the border color and text color? HOT 4
- Display cursor inside the CharView HOT 2
- Traditional View Support HOT 2
- it shouldn't input other symbol such as '.' ',' HOT 2
- 3.0.0 version does not adapter the code for 2.1.2 HOT 2
- Please add the support for border circle shape in OTP character HOT 2
- I can’t able to type anything into OTPview HOT 9
- How to Clear All Fields HOT 1
- Cursor not visible HOT 2
- LeakCanary found a memory leak in OtpView HOT 2
- How to change box size? HOT 2
- Crash on OtpView.java:236 HOT 2
- How to run it using gradle.kts HOT 1
- Line Color HOT 2
- Not able to style OTP Text HOT 2
- Support for AndroidTV HOT 2
- OtpLineColor not working in version 3.1.0 HOT 2
- Add keyboardActions to compose view HOT 2
- Version 3.2.0 doesn't declare licenses. HOT 2
- Border Color issue
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 android-otpview-pinview.