I've got this little validation routine that I need to check if values fall within a certain range...
Only thing is, the request focus on that field is not doing what I had hoped it would do.
B4X:
Sub EditTextcartno_EnterPressedDim x As Int
condition1 = False
x = EditTextcartno.Text
If x >0AND x <= 150Then
condition1 = True
enablesendElse
ToastMessageShow("Cart number must be between 0 to 150",False)
EditTextcartno.Text = ""
EditTextcartno.RequestFocus
condition1 = False
EndIf
End Sub
I'd like the focus to stay within the EditTextcartno after failing the condition, but it's not happening now (it jumping to the next edittextbox).