More shorter code compared to here
Example:
Example:
B4X:
Sub Globals
Dim txtPIN As EditText
End Sub
Sub txtPIN_TextChanged (Old As String, New As String)
If New.Length > 6 Then
txtPIN.Text = Old
txtPIN.SelectionStart = Old.Length
End If
End Sub