I am using Xamarin and I have a TextView loaded via an XML layout file with the following code:
SetContentView (Resource.Layout.TextView);
Once the TextView is loaded onscreen, how can I change the Text of the TextView? How can I refer to the TextView via code as I have not declared it as a variable?
I have tried this with no result:
TextView PhoneNumber = (TextView)FindViewById(Resource.Layout.TextView);
PhoneNumber.Text = "This is a phone number: 0800 64 64 64";
The TextView is not displayed onscreen at all.
Can I please have some help?
Thanks in advance.