Android Question Refer to view with a string

Josh Dobson

Member
Licensed User
Hello all,

I am writing an application that is being sent strings via asyncstreams. I then parse the strings to acquire the appropriate variable values, which brings me to my question. The server that sends the strings to my app and formats them in such a way that the first part of the string matches the edittext view name. Maybe a dumb question but here goes: Is it possible to simply use the parsed string to set the edittext.text value directly?
Maybe this visual might help...

String from server = "txtStatus=1234*"
string1 = "txtStatus"
string2 = "1234"

Name of view = "txtStatus"

Would love a method to say something like: string1.text = string2.text

I hope that makes sense.

Thanks to all
 
Last edited:
Top