-
Notifications
You must be signed in to change notification settings - Fork 78
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
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
...
}
The text was updated successfully, but these errors were encountered: