Falmarri Falmarri - 4 months ago 112
Android Question

Android textview outline text

Is there a simple way to have text be able to have a black outline? I have textviews that will be different colors, but some of the colors don't show up on my background so well, so I was wondering if there's an easy way to get a black outline or something else that will do the job? I'd prefer not to have to create a custom view and make a canvas and such.


You can put a shadow behind the text, which can often help readability. Try experimenting with 50% translucent black shadows on your green text. Details on how to do this are over here: http://stackoverflow.com/questions/2486936/android-shadow-on-text

To really add a stroke around the text, you need to do something a bit more involved, like this: http://stackoverflow.com/questions/1723846/how-do-you-draw-text-with-a-border-on-a-mapview-in-android