Is there not a simple way to programmatically set the border of a View / ViewGroup / RelativeLayout in Android like there is in iOS?
I'm working in C# in Xamarin.Android. In iOS, it's as simple as
View.Layer.BorderColor = X; View.Layer.BorderWidth = 2;
But after scouring a number of sites and the Xamarin documentation, there doesn't seem to be a simple way to do this in Android. To me, simple is the above (one or two lines), but knowing Android's desire to over complicate everything, I would even settle for a solution that requires eight or nine lines of code.
Yes, I do require a programmatic solution, not editing the XML.
Many answers to similar questions I've found don't give a way to do it programmatically.
The closest I've found is this Android add border to edit text programmatically. But I'm wondering is there not a simpler way to do what seems like it would be a commonly used thing, rather than creating an entire class just to add/remove a border from a view? Did Android really overlook such a seemingly useful and common property? Or am I completely misguided and completely blind to something so simple?