Android Question Views Question

mjtaryan

Active Member
Licensed User
Longtime User
I need to write a sub that takes views that have a text property and turn the text content into a RichString (i.e. Label, EditText, ListView). Is there a way to to do this by specifying a single parameter for the view and another for the text? I tried using the View class, but I get an error when I try to assign the RichString text to the target's text property (looking at the property list in code, there is no Text property listed for that class). The only (inelegant) workaround I've come up with is to supply a parameter for each type of view that takes text). I'm hoping there's another way -- if not, I have another question. Thanks.
 

mjtaryan

Active Member
Licensed User
Longtime User
NEVERMIND. I did some experimenting and found a better solution than the ineligant workaround. The solution uses the "Is" keyword to determine if the view is of the needed type (i.e. "If Vu Is EditTExt Then..."). I'd still be interested if there is an even better (more efficient/elegant) way of doing what I need.
 
Upvote 0
Top