B4J Library [ABMaterial] New component ABMPatternLock (1.20)

ABMPatternLock is yet another authentication method you can use based on the popular Pattern Lock you see in e.g. Android.

PatternLock.png


Usage:

B4X:
Dim patlock As ABMPatternLock
patlock.Initialize(page, "patlock", 3, "")
page.Cell(5,1).AddComponent(patlock)

Sub patlock_Changed(target As String, value As String)
    Log(value)
    Dim patLock As ABMPatternLock = page.Component("patlock")
' check if the code is ok, else you can use patlock.ShowIsWrong to tell it to the user.
     If code <> "1;2;5;6" then
        patlock.ShowIsWrong
     End if
End Sub
 

ggpanta

Member
Licensed User
Longtime User
@alwaysbusy , How does one set and save a pattern with this? For now one checks if the secret is 'M', what if I want it to be 'Z' how can I set that with code?

Thanks

Check here:

If code <> "1;2;5;6"then

The numbers are the pins you swipe your fingers over, to change it to a Z then you would need all 3 from the top row, the middle from the middle row and all 3 from the bottom row, ie 1;2;3;5;7;8;9
 
Top