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

ShimmerContainer and maskElements leaking views on multiple calls to VeilLayout#setLayout(View) #21

Merged
merged 1 commit into from
Feb 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class VeilLayout : FrameLayout {
var isVeiled = false
private set

private val maskElements = ArrayList<View>()
val shimmerContainer = ShimmerFrameLayout(context)
val nonShimmer = Shimmer.AlphaHighlightBuilder().setBaseAlpha(1.0f).setDropoff(1.0f).build()
var shimmer = Shimmer.AlphaHighlightBuilder().build()
Expand Down Expand Up @@ -174,6 +173,7 @@ class VeilLayout : FrameLayout {
fun setLayout(layout: View) {
removeAllViews()
addView(layout)
shimmerContainer.removeAllViews()
onFinishInflate()
}

Expand Down Expand Up @@ -224,7 +224,6 @@ class VeilLayout : FrameLayout {
setColor(Color.DKGRAY)
cornerRadius = radius
}
maskElements.add(this)
shimmerContainer.addView(this)
}
}
Expand Down