Fun with Android, Text and Gradient Shadow

  1. Draw text with default shadow by setting params we need to paint.setShadowLayer() function.
  2. Draw our gradient with PorterDuff.Mode.SRC_ATOP.
  3. Draw our text once again on top of our colored shadow.
A small hint for Xfer modes.

--

--

Staff Software Engineer @LyftLevel5 https://github.com/stepango | https://level5.lyft.com/

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store