react-native-pager-view
react-native-pager-view copied to clipboard
Curl not working properly
The curl effect it's not working properly for me. When you start sliding, it always goes on the X axis,
Has someone else also experience this?
<ViewPager
initialPage={page - offset}
ref={vpRef}
style={[props.style, StyleSheet.absoluteFillObject, {flex:1}]}
onStartShouldSetResponder={() => props.onStartShouldSetResponder()}
pageMargin={0}
orientation={'horizontal'}
scrollEnabled={true}
transitionStyle={'curl'}
onPageSelected={onPageSelected}>
{props.data
.slice(offset, offset + windowLength)
.map((item, index) =>
renderPage(
props.renderItem,
item,
offset + index,
page,
buffer - internalBuffer,
),
)}
</ViewPager>
It's like, it doesn't lean like a page effect
Is someone else also experiencing this problem?
Android currently does not support curl type
Hello @mqtik,
I'm experiencing the same issue. The curl mode worked properly until yesterday when I upgraded my project from Expo v36.0 to v39.0. Now, the curl is shown, but locked on the X axis.
I don't know if Expo is the problem, or if when I upgraded Expo version it has updated some dependencies as well. Do you use Expo as well or pure React Native?
another interesting point with curl.
If you set transition to curl, tap on the side of the screen start the transition to another page. Without curl, tap do nothing
@batical, yes this is the native behavior of the Pager on iOS. The pain point of that is we cannot disable the tap from the lib react-native-viewpager for now. It means we can't add buttons in this area of the screen because the pager will change the page instead of firing onPress on the button.
is there a way to implement the curl effect on Android?
I noticed that the onPageScrollStateChanged event not fired when the transition == curl Is it the expected behaviour?
I noticed that the onPageScrollStateChanged event not fired when the transition == curl Is it the expected behaviour?
I was trying to fix this, but the native component does not have the ability to listening on scrolling.
is there a way to implement the curl effect on Android?
Probably there is a way to do it, but this kind of behavior is not supported by default. On android a custom solution should be used.
@troZee what is the custome solution of creating curl effect on react native Android . Please give us Link to solution