Closed phyzical closed 4 years ago
Yep, I have the same issue. Sometimes it fires and sometimes not: When I change 2 tabs, then callback is called, but never when I change only one tab. It's Android 8.0, maybe this will help.
Any word on this issue?
Here I change internal ScrollView
to FlatList
and worked.
I submited a pull request.
thanks i will give this a test later today, and confirm it works
hey there, gave it a test, the problem still persists unfortunately,
again this seems to only occur on android
Hey there, great component. Temporarily, for fix this bug, I used the style backgroundColor in pagination objects. The example bellow, in Android, not firing onScrollEnd():
<Pages onScrollEnd={this.onScrollEnd.bind(this)} >
<View style={{ flex: 1}} />
<View style={{ flex: 1 }} />
<View style={{ flex: 1 }} />
</Pages>
Now, it's functional example:
<Pages onScrollEnd={this.onScrollEnd.bind(this)} >
<View style={{ flex: 1, backgroundColor: 'red' }} />
<View style={{ flex: 1, backgroundColor: 'green' }} />
<View style={{ flex: 1, backgroundColor: 'blue' }} />
</Pages>
Setting backgroundColor: 'transparent'
also works for those who don't want to set a real background color.
Same issue at 0.7.0 in Android.
In pagination objects, backgroundColor
should been set with any color, also can be 'transparent'. And you should wrap other Component like <Image>
with <View>
, then set the backgroundColor
of <View>
Sometimes it's happen if present margin from left and right, and swiping started from margin. You need add padding instead margin, and don't forget about set backgroundColor
.
Thanks for issue and sorry for delayed reply. I've added collapsable
prop to all children in 37180351 and starting from next release there will be no need for backgroundColor
hack.
Hey there!
great little component :)
i found this previous issue where people seem to say it has been resolved? https://github.com/n4kz/react-native-pages/issues/13
Do i need a certain RN/ R to make it work?
i seem to have the functionality that was before the fix which was it randomly fires the callback on scroll end
(im also testing on the android simulator not sure if this makes a difference)
ive even tried rolling back to 0.5.6 version with the same results :(
i also have a prop being updated via dispatch which show the body contents of the current 'active' page and nulls for the rest to increase performance when there is lots of pages in case this could have something todo with it.
edit. oh as i remember seeing it being a float conversion issue before i have 42 pages in my current senario