I am trying to change the color of a textview in Android MonoDevelop.
I have tried this:
TextView mapTextView = new TextView(contextOverlay);
mapTextView.Text = overlayDetailsForThisOverlay.stringName;
mapTextView.setTextColor(Color.RED);
I get the following error:
Android.Widget.TextViewdoes not contain a definition forsetTextColor.
I have tried to add the following as a using statement:
using `Android.Graphics`;
With no luck.
May I please have some help?
I can’t understand if you want to change the background color or the text color. Anyway, to change the text color you should use this:
And to change the background color:
Don’t forget to put this in your imports: