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 963dcfd commit 3055666Copy full SHA for 3055666
android/src/main/java/com/reactnativecommunity/viewpager/FragmentAdapter.java
@@ -34,9 +34,14 @@ public long getItemId(int position) {
34
return childrenViewIDs.get(position);
35
}
36
37
+ @Override
38
+ public boolean containsItem(long itemId) {
39
+ return childrenViewIDs.contains((int) itemId);
40
+ }
41
+
42
public void addFragment(View child, int index) {
- childrenViewIDs.add(child.getId());
- notifyItemChanged(index);
43
+ childrenViewIDs.add(index, child.getId());
44
+ notifyItemInserted(index);
45
46
47
public void removeFragment(View child) {
0 commit comments