We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb82ad0 commit 10c052fCopy full SHA for 10c052f
android/src/main/java/com/reactnativepagerview/ViewPagerAdapter.kt
@@ -48,6 +48,12 @@ class ViewPagerAdapter() : Adapter<ViewPagerViewHolder>() {
48
}
49
50
fun removeAll() {
51
+ for (index in 1..childrenViews.size) {
52
+ val child = childrenViews[index-1]
53
+ if (child.parent?.parent != null) {
54
+ (child.parent.parent as ViewGroup).removeView(child.parent as View)
55
+ }
56
57
val removedChildrenCount = childrenViews.size
58
childrenViews.clear()
59
notifyItemRangeRemoved(0, removedChildrenCount)
0 commit comments