Giter Club home page Giter Club logo

Comments (11)

TJBlack31 avatar TJBlack31 commented on August 25, 2024

@altaf2892 May I ask why you need to exclude app:otp="1234"? The documentation says to keep it included.

from android-otpview-pinview.

altaf2892 avatar altaf2892 commented on August 25, 2024

it shows otpview filled with 1234 to user for the first time .so

from android-otpview-pinview.

mukeshsolanki avatar mukeshsolanki commented on August 25, 2024

@altaf2892 are you using the latest version of the lib? the example app seems to be working fine

from android-otpview-pinview.

altaf2892 avatar altaf2892 commented on August 25, 2024

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.

mukeshsolanki avatar mukeshsolanki commented on August 25, 2024

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.

mukeshsolanki avatar mukeshsolanki commented on August 25, 2024

@altaf2892 any update?

from android-otpview-pinview.

altaf2892 avatar altaf2892 commented on August 25, 2024

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.

mukeshsolanki avatar mukeshsolanki commented on August 25, 2024

That bug was fixed in 1.1.0 can you please update and test @altaf2892

from android-otpview-pinview.

altaf2892 avatar altaf2892 commented on August 25, 2024

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.

mukeshsolanki avatar mukeshsolanki commented on August 25, 2024

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.

mukeshsolanki avatar mukeshsolanki commented on August 25, 2024

@altaf2892 any update on this?

from android-otpview-pinview.

Related Issues (20)

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.