Analysis updated 2026-07-03
Add a customizable drop shadow to a button or card in your Android app without creating separate XML drawable files.
Set up pressed and idle background color states on a button using ShadowLayout so it responds visually to taps without extra drawables.
Apply rounded corners and a clipping mask to a video player view in an Android layout using ShadowLayout's clipping feature.
| lihangleo2/shadowlayout | coderbruis/javasourcecodelearning | dromara/liteflow | |
|---|---|---|---|
| Stars | 3,737 | 3,738 | 3,740 |
| Language | Java | Java | Java |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 1/5 | 3/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires migrating to JitPack in Gradle settings and using AndroidX, version 3.x has breaking API changes from the 2.x series.
ShadowLayout is an Android UI library written in Java that makes it easy to add drop shadows and visual shape effects to any element in an Android app. Normally, Android developers have to create separate XML drawable files to define shadows, borders, and background shapes for buttons and other components. ShadowLayout replaces that tedious process by letting you configure everything directly in your layout file or in code at runtime. The core idea is a wrapper component: you place a ShadowLayout around any other UI element, set a few properties, and that element gets a fully customizable shadow. You can control the shadow color, how far it spreads, whether it has rounded corners (and how round each individual corner is), and how much it shifts along the horizontal or vertical axis. You can also hide the shadow on specific sides, so for instance a card might only show a shadow on the bottom and right. Beyond shadows, the library handles shape and selector behavior. A selector in Android is what defines how a button looks when it is pressed versus when it is idle. Normally that requires extra drawable files, but ShadowLayout builds it in: you set a normal background color and a pressed background color, and the component handles the visual switch automatically. It also supports ripple effects (the circular animation that spreads out from a tap), gradient backgrounds, stroke borders, and image backgrounds with their own pressed states. One practical feature is binding a ShadowLayout to a text element so the background color automatically follows the text color when that changes. There is also a clipping option, which lets you round or mask the corners of a child view like a video player, something that is otherwise awkward to do in Android. The library is distributed through JitPack, so adding it to an Android project is a matter of a few lines in the project's build files. It supports AndroidX and has been updated through several major versions, with the 3.x line bringing significant API changes relative to the 2.x series.
An Android Java library for adding customizable drop shadows, rounded corners, gradients, and tap-state effects to any UI element by wrapping it in a ShadowLayout container.
Mainly Java. The stack also includes Java, Android, JitPack.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.