Android Question disable/enable edittext

ronell

Well-Known Member
Licensed User
Longtime User
i want to disable the password edittext when the username edittext has no value

for example:

B4X:
if textuser.text = "" then
    textpass.enabled = false
else
    textpass.enabled = true
end if

i already try the code above but nothing happens
 

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
B4X:
Sub textuser_TextChanged (Old As String, New As String)
  
      textpass.Enabled=Not(New.Trim.Length=0)
  
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…