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

android onScrollEnd() not firing #24

Closed
phyzical opened this issue Feb 23, 2018 · 10 comments
Closed

android onScrollEnd() not firing #24

phyzical opened this issue Feb 23, 2018 · 10 comments

Comments

@phyzical
Copy link

phyzical commented Feb 23, 2018

Hey there!

great little component :)

i found this previous issue where people seem to say it has been resolved? #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

@matyj
Copy link

matyj commented Mar 27, 2018

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.

@Danstett
Copy link

Danstett commented Apr 6, 2018

Any word on this issue?

rayronvictor added a commit to rayronvictor/react-native-pages that referenced this issue May 3, 2018
@rayronvictor
Copy link

Here I change internal ScrollView to FlatList and worked.
I submited a pull request.

@phyzical
Copy link
Author

phyzical commented May 4, 2018

thanks i will give this a test later today, and confirm it works

@phyzical
Copy link
Author

phyzical commented May 5, 2018

hey there,
gave it a test, the problem still persists unfortunately,

again this seems to only occur on android

@thiago1belino
Copy link

thiago1belino commented Sep 25, 2018

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>

@dackmin
Copy link

dackmin commented Oct 23, 2018

Setting backgroundColor: 'transparent' also works for those who don't want to set a real background color.

@wanghe826
Copy link

wanghe826 commented Dec 4, 2018

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>

@Kiolk
Copy link

Kiolk commented Apr 9, 2019

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.

@n4kz
Copy link
Owner

n4kz commented Oct 6, 2019

Thanks for issue and sorry for delayed reply. I've added collapsable prop to all children in 3718035 and starting from next release there will be no need for backgroundColor hack.

@n4kz n4kz closed this as completed Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants