Android Question Button.Text

jinyistudio

Well-Known Member
Licensed User
Longtime User
Hi

Use RunMethod2. Could i change the text of button ? How to typing the code ?

B4X:
Sub SetPressed(cmd As Button, Pressed As Boolean)
   Dim ref As Reflector
   ref.Target = cmd
     ref.RunMethod2("setPressed", Pressed, "java.lang.boolean")
End Sub
 

jinyistudio

Well-Known Member
Licensed User
Longtime User
You can change cmd.Text = "new text"
Hi

I know it(cmd.Text = "new text") but I counld't see it display on the button face sometime when I continuous updating multiple buttons as following

B4X:
btn1.text = s1
btn2.text = s2
btn2.text = s3
 
Upvote 0
Top