h6ah4i / h6ah4i/android-materialshadowninepatch
Question - difference between shadowElevation and shadowTranslationZ?
- Dominant language
- Java
- Stars
- 475
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
I've been playing around with the values in my app, and also looked at your source code, but I can't quite figure out what the difference is. I'm assuming shadowElevation is how "high" the shadow should be, e.g., what the elevation is of the material it's cast upon? While shadowTranslationZ is how "high" the item in the container is? I'm not sure – shadowElevation is not used in your sample!
Likewise for how much margin is required - you put 16dp for everything in the examples, but how can we calculate the minimum margin required for each shadow size?
Thank you so much for this library, I hope a short guide in the README would as helpful to others!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the README, the linked examples, and the library source code referenced in the question. Clarify the difference between shadowElevation and shadowTranslationZ, explain how to choose the minimum margin for each shadow size, and update the README with a short guide whose examples are consistent with the documented behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100