-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null Pointer Exception #20
Comments
Have you managed to resolve this problem? I am getting this null pointer and i am unable to fix it. |
No, I didn't. I ended up with using another library. |
What library did you use? |
Any solutions yet guys? |
I know it is too late but for anyone who still wanna use this library (even tho it is too old) and is facing the same issue: I had the same issue and the problem was because I forgot to set the title. I solved it by adding a title. You can add title using either of following methods. |
I am getting null pointer exception on java.lang.String.length()
Error:
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference at android.graphics.Canvas.drawText(Canvas.java:1703) at com.kevalpatel.passcodeview.internal.BoxTitleIndicator.drawView(BoxTitleIndicator.java:147) at com.kevalpatel.passcodeview.PinView.drawView(PinView.java:222) at com.kevalpatel.passcodeview.internal.BasePasscodeView.onDraw(BasePasscodeView.java:247) at android.view.View.draw(View.java:17526) at android.view.View.updateDisplayListIfDirty(View.java:16519) at android.view.View.draw(View.java:17295) at android.view.ViewGroup.drawChild(ViewGroup.java:3926) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716) at android.view.View.updateDisplayListIfDirty(View.java:16514) at android.view.View.draw(View.java:17295) at android.view.ViewGroup.drawChild(ViewGroup.java:3926) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716) at android.view.View.updateDisplayListIfDirty(View.java:16514) at android.view.View.draw(View.java:17295) at android.view.ViewGroup.drawChild(ViewGroup.java:3926) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716) at android.view.View.updateDisplayListIfDirty(View.java:16514) at android.view.View.draw(View.java:17295) at android.view.ViewGroup.drawChild(ViewGroup.java:3926) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3716) at android.view.View.draw(View.java:17529) at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:3187) at android.view.View.updateDisplayListIfDirty(View.java:16519) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:325) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:331) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:366) at android.view.ViewRootImpl.draw(ViewRootImpl.java:3234) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3033) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2615) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1528) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7530) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911) at android.view.Choreographer.doCallbacks(Choreographer.java:686) at android.view.Choreographer.doFrame(Choreographer.java:622) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7325) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
This is my xml file:
`
`
This is activity.java
`package cloud.mushfiq.buet.chargesekure;
import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.kevalpatel.passcodeview.PinView;
import com.kevalpatel.passcodeview.authenticator.PasscodeViewPinAuthenticator;
import com.kevalpatel.passcodeview.indicators.CircleIndicator;
import com.kevalpatel.passcodeview.keys.KeyNamesBuilder;
import com.kevalpatel.passcodeview.keys.RoundKey;
public class pinActivity extends Activity {
}`
this is dim file:
20dp 3dp 25dp 25dp 15dp 5dpWhat is the problem going on ?
The text was updated successfully, but these errors were encountered: