Android Question request focus

Discussion in 'Android Questions' started by merlin2049er, Feb 22, 2015.

  1. merlin2049er

    merlin2049er Well-Known Member Licensed User

    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.

    Code:
    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).

    Any suggestions?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice