0

I have an app where I am trying to add text shadow to a TextView. The problem is: the shadow is always very thin. I'd like it to be thicker.

I am trying to generate "memes", as some of you might know from the "fun sites" on the internet. My goal is something like this font:

http://d24w6bsrhbeh9d.cloudfront.net/photo/4324188_460s.jpg

I am using the same exact font, Impact. The problem is, when I add a black border shadow, the shadow is not visible enough and it's not wide enough. It's barely barely noticeable.

I am defining a FrameLayout, with the picture on the bottom and two text fields, one on the top and one on the bottom. The shadow is barely visible for both of them.

I have been using the parameters, shadowDy, shadowDx, etc. I know the shadowRadius is the parameter that actually defines the border size, but I have been experimenting both with values above 1 and below 1, and I can't seem to get any good results. There are minimal changes in size and shadow density, but nothing useful.

I have considered another option, which is a last resort, which is drawing the text twice, a bigger black font in the BG and align the character spacing so that the black text becomes the shadow of the white text on the front.

Thank you in advance !

1 Answers1

1

You won't be able to accomplish that effect with the basic TextView shadows. I'd look at adding a stroke instead:

https://stackoverflow.com/a/2151964/321697

http://developer.android.com/reference/android/graphics/Paint.Style.html

Community
  • 1
  • 1
Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
  • I am trying to implement but now I have a different problem. If you could offer some feedback, I've created a new question: (http://stackoverflow.com/questions/10824871/android-programatically-stroke). Thanks again –  May 30 '12 at 22:01