ZDepthShadow
ZDepthShadow copied to clipboard
multiplying shadows
When programmatically attaching this view to a ViewGroup, shadows are added but never removed. This quickly results in added but never removed shadows, stacking and darkening the shadow with a poor result.
Thank you for this library! The solution is explained below:
public class ZDepthShadowLayout extends FrameLayout { ... onAttachedToWindow() { ... addView(mShadowView, 0); // source of issue ... } ... // START solution to issue onDetachedFromWindow() { super.onDetachedFromWindow(); removeViewAt(0); } // END solution to issue ... }