Skip to content
Open
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 @@ -52,10 +52,9 @@ class ViewPagerAdapter() : Adapter<ViewPagerViewHolder>() {
}

fun removeAll() {
for (index in 1..childrenViews.size) {
val child = childrenViews[index-1]
if (child.parent?.parent != null) {
(child.parent.parent as ViewGroup).removeView(child.parent as View)
for (child in childrenViews) {
if (child.parent != null) {
(child.parent as ViewGroup).removeView(child)
}
}
val removedChildrenCount = childrenViews.size
Expand Down