ZDepthShadow icon indicating copy to clipboard operation
ZDepthShadow copied to clipboard

multiplying shadows

Open ameron32 opened this issue 9 years ago • 0 comments

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 ... }

ameron32 avatar May 01 '15 21:05 ameron32