Reputation: 13931
I want to create something close to Material Theme in app that is supposed to work with Android 4.x and 5.x.
I have tried to use Material theme, but I need api 21 for that. My current minimum api is 15 and I want to keep that.
Do I have to create shadows as PNG images or there is easier way?
I want to keep application compatybile with Android 4.x and I have no time to maintain two versions (for Android 4.x and 5.x).
Upvotes: 1
Views: 394
Reputation: 16537
I wouldn't call it an easy way, but you can mimic real animated shadows on any device above Android Cupcake. Here's how it works:
It requires adding custom elevation attributes, custom views capable of rendering shadows, and using render script and the compatibility library (for older devices).
If you'd like to see that solution in action, check my library:
https://github.com/ZieIony/Carbon
Upvotes: 1