Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiplying shadows #5

Open
ameron32 opened this issue May 1, 2015 · 0 comments
Open

multiplying shadows #5

ameron32 opened this issue May 1, 2015 · 0 comments

Comments

@ameron32
Copy link

ameron32 commented May 1, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant