Android Question Change the contents of a editText in another module?

Orcino Borges

Member
Licensed User
Longtime User
Hi everbody,

I have a problem and would like your help.

In the main module I have an EditText where the User type text.

How to change this text via another module ?

Thanks in advance.

Orcino
 

Orcino Borges

Member
Licensed User
Longtime User
You can use CallSubDelayed to call a sub in the main module.

Thanks Erel.

It worked, but the program goes to the main screen. I tried to put a return, but this way the screen flashes.

See the code below

Module X

B4X:
Sub trocaSenha_Down   
   
    Vibrate.Vibrate(35) ' Vibrate phone for 50 ms
    tamanho=novaSenha.Text
 
    If tamanho.Length <> 4 Then 
        Msgbox("A senha deve ter 4 digitos ", "Atenção") 
        Return
    End If 
   
   
    msg.Send(Main.nDigitado,"#" & Main.senhaDigitada & " nova senha #" & novaSenha.Text)
    Main.senhaAlterada =  novaSenha.Text     
    CallSubDelayed(Main, "mudaSenha")
     

End Sub


Module MAIN

B4X:
Sub mudaSenha

Senha.Text = senhaAlterada

End Sub
 
Upvote 0
Top