0

For my AppCompatTextView, I want to add a black outline to the text. Something like the following: Example text with black outline

How do I do this in my XML file?

Tom Darious
  • 434
  • 6
  • 18
  • 1
    You've got several options, but you will most probably have to do a custom view. Check out answers for a similar question here https://stackoverflow.com/questions/3182393/android-textview-outline-text – Onur D. Jul 18 '22 at 22:01
  • @OnurD. The solutions on that post are all showing you how to create a shadow, not an outline. – Tom Darious Jul 18 '22 at 22:12
  • 1
    Not if you read them carefully. This one https://stackoverflow.com/a/65572491/8354184 specifically talks about a "stroke" and this one https://stackoverflow.com/a/65572491/8354184 talks about using "shadow" related apis to mimic a "stroke". Give them both a try, I assume one of them should work. – Onur D. Jul 18 '22 at 22:17
  • similar question https://stackoverflow.com/a/15225489/12709358 – Elango Jul 24 '22 at 17:03

0 Answers0