Android Question Edit text. Selectionlength

Discussion in 'Android Questions' started by peggjones, Aug 3, 2019.

  1. peggjones

    peggjones Active Member Licensed User

    Does anyone understand this? If I select some text by pressing on the screen as one would to cut and paste etc. It always returns 0. Am I missing something?

    Thanks
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Seems to work fine. Tested with this code:
    Code:
    Sub Globals
       
    Private EditText1 As EditText
    End Sub

    Sub Activity_Create(FirstTime As Boolean)
       
    Activity.LoadLayout("1")
    End Sub


    Sub Activity_Resume
       
    Do While True
           
    Log(EditText1.SelectionLength)
           Sleep(
    1000)
       
    Loop
    End Sub
     
    peggjones likes this.
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