title: Gradient Shader for Custom Shape Android
body: <p>I have defined a pill like shape using a path in my custom view and I'll like something like a radial gradient shader on it, however, rather than being radial (i.e. a circle) I want the gradient to &quot;eminate&quot; from the center of the pill outwards equally in all directions.</p>
  <p>So, a radial gradient would have been perfect if I was applying it to a circular shape, but I need one that works for a pill like shape.</p>
  <p>Effectively, what is shown in the image below (the background gradient):</p>
  <p><a href="https://i.stack.imgur.com/MIurK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MIurK.png" alt="gradient" /></a></p>