Skip to content
zedalpha edited this page May 25, 2022 · 21 revisions

Shadow Gadgets

A utility library for Android with various tools to help fix the elevation shadow artifacts visible on Views with transparent or translucent backgrounds.


General

  • The modern UI toolkit makes accomplishing the core fix relatively simple, and is so new that it's arguably of little benefit to attempt to devise a one-size-fits-all, externally-applicable solution in it to add to the library. For now, the linked gist has several examples that are pretty much usable as-is.

  • These serve as another means to apply the shadow properties through layout XML and inflation, but they are mainly geared toward doing so in existing setups with minimal changes.


API Reference

  • The three core library properties, related enum classes, etc.

  • The ClippedShadowsViewGroup interface, and common XML attributes.

  • The custom implementations of RecyclerView and platform AdapterView subclasses.

  • The various non-recycling ones, including customizations of both platform and Jetpack classes.

  • The ShadowDrawable class.

  • The three inflation helpers for the various configurations, the TagMatcher interface and related functions, etc.

Clone this wiki locally