B4A Library PasscodeView

This is a wrap for this github project.

demo.gif


demo1.png demo2.png

PasscodeView
Author:
DonManfred (wrapper)
Version: 1
  • PasscodeView
    Events:
    • onFail ( As )
    • onSuccess (number As String)
    Fields:
    • ba As BA
    Methods:
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Initialize (EventName As String)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • clearInput
    • initListener
    • runOkAnimation
    • runTipTextAnimation
    • runWrongAnimation
    Properties:
    • Background As Drawable
    • Color As Int [write only]
    • CorrectInputTip As String
    • CorrectStatusColor As Int
    • Enabled As Boolean
    • FirstInputTip As String
    • Height As Int
    • Left As Int
    • LocalPasscode As String
    • NormalStatusColor As Int
    • NumberTextColor As Int
    • Padding()() As Int
    • Parent As Object [read only]
    • PasscodeLength As Int
    • PasscodeType As Int
    • SecondInputTip As String
    • Tag As Object
    • Top As Int
    • Visible As Boolean
    • Width As Int
    • WrongInputTip As String
    • WrongLengthTip As String
    • WrongStatusColor As Int


Important:
- V1.00 is for the old Android Support Libraries.
- V1.01 and up is based on AndroidX.
 

Attachments

  • PasscodeViewV1.0.zip
    17.7 KB · Views: 448
  • res.PasscodeView.zip
    7.4 KB · Views: 440
  • PasscodeViewEx.zip
    9.3 KB · Views: 393
  • PasscodeViewV1.01.zip
    37.1 KB · Views: 422
Last edited:

Alexander Stolte

Expert
Licensed User
Longtime User
Good lib., but i cannot check the input value before he is checking right? Because, i get the pin from my Server with a AES Protection and i want to check if the input is equal to this from the server. Is that planned in the future to implement that so i can check the input from the user?, it would definitely save me a lot of work and would be willing to donate.

Greetings

PD: I deleted my last comment because I thought I had found a solution sorry :rolleyes:
 

Multiverse app

Active Member
Licensed User
Longtime User
Running the example gives me the error:

B4X:
Copying updated assets files (2)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 34 (Main)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.example.main._activity_create(main.java:385)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at b4a.example.main.afterFirstLayout(main.java:104)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
    ... 18 more
Caused by: android.view.InflateException: Binary XML file line #65: Binary XML file line #65: Error inflating class android.support.v4.widget.Space
Caused by: android.view.InflateException: Binary XML file line #65: Error inflating class android.support.v4.widget.Space
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.widget.Space" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/b4a.example-mxQLYwSA1gyZ7sKRJEg6lQ==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-mxQLYwSA1gyZ7sKRJEg6lQ==/lib/x86_64, /system/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    at android.view.LayoutInflater.createView(LayoutInflater.java:606)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
    at android.view.View.inflate(View.java:24354)
    at com.hanks.passcodeview.PasscodeView.<init>(PasscodeView.java:64)
    at com.hanks.passcodeview.PasscodeView.<init>(PasscodeView.java:58)
    at de.donmanfred.PasscodeViewwrapper._initialize(PasscodeViewwrapper.java:98)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
    at b4a.example.main._activity_create(main.java:385)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at b4a.example.main.afterFirstLayout(main.java:104)
    at b4a.example.main.access$000(main.java:17)
    at b4a.example.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.h
Message longer than Log limit (4000). Message was truncated.
** Activity (main) Resume **
 
Top