2

I've been looking how to outline the a TextView and so far I just found this question, but is from the 2010. I think that nowadays there is a standard way to outline the text but so far I haven't managed to make it. what I have in my code is the following:

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#3e3e3e"
    android:shadowColor="#ffffff"
    />

But I get the following rendering error:

Paint.setShadowLayer is not supported

I would appreciate to know if there is another way to outline the text or how to handle this error! Thank you!

Community
  • 1
  • 1
Alvaro
  • 1,430
  • 2
  • 23
  • 41

1 Answers1

5

Try to Set shadow radius etc. Only setting color cannot make the shadow appear.

Example:

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#3e3e3e"
    android:shadowColor="#ffffff"
    android:shadowDx="2"
    android:shadowDy="2"
    android:shadowRadius="1"
/>
Oğuzhan Döngül
  • 7,856
  • 4
  • 38
  • 52