jpapillon / react-native-carousel-pager Goto Github PK
View Code? Open in Web Editor NEWReact Native carousel pager.
License: MIT License
React Native carousel pager.
License: MIT License
My Page is a TouchableOpacity which contains a view and a text. The onPress of the TouchableOpactiy is not working. I was using a FlatList before and the touchable was working fine. I just replaced the FlatList with this library. Is there any issue with the library when using a TouchableOpacity? A single item of carousel looks something like this -
<TouchableOpacity
key={idx}
onPress={this.onFeaturedTapped.bind(this, chef)}
style={{ paddingLeft: moderateScale(15), backgroundColor: 'green' }}
>
<View style={styles.sliderItem}
>
<CacheableImage style={styles.sliderItemImage}
defaultSource={require('../../../assets/Images/placeholder.jpg')}
source={{ uri: 'https://' + chef.image ? chef.image.imageURL : '' }}
/>
<BackgroundImage
src={require('../../../assets/Images/icHat.png')}
bgStyle={styles.sliderCapView}
>
<Text style={styles.sliderItemTextStyle}>5</Text>
</BackgroundImage>
<Text numberOfLines={1} style={styles.sliderNameTextStyle}>{chef.name}</Text>
</View>
</TouchableOpacity>
Kudos to your efforts.
There is some issue with changing pages. It works fine when there is swipe with a single touch but if you touch with the second finger while swiping, the carousel stops in between. So, if the page is fullscreen and you do this, it looks like the carousel is frozen.
Steps to reproduce:
desired/proposed behavior - while the current page is halfway dragged and other is half visible, the carousel should change to the next page completely as soon as it is touched with the second finger.
Or if it should not be the desired behavior at all, can you please suggest on how can I achieve it?
I tired to solve this and found answers that we need to explicitly set this value but i don't see where where to set this value
I did try to add a array of element's and I work with a .map to get a View element out for every one of them - the first element returned is showing for me but not the rest.
hello example doesn't wok like as you show
Hi,
I've just started to react native and I used your carousel pager. But I have a problem. I didn't add click event on the card. How can I do it? Can you help me about this issue ? I am waiting your reply. Thanks.
Hi! Is there a feature where I can scroll to a specific view programmatically?
Hi, I'm new to react native, forgive me if the answer is obvious.
First off, nice work with the animation !
I was wondering if there is a way to get an event or a variable containing the number of the page that has the focus ? I need to make an animation depending of the current page .
I see that in the code there is a _currentPage variable, but I don't know how to access it from my component.
Thanks in advance for the help
adding just one image to the carousel will throw undefined Error
Bonjour !
Est-ce qu'il serait possible d'intégrer un défilement automatique, avec des indicateurs en dessous (ronds) ? Et lorsque le défilement automatique arrive à la dernière page, retourne à la 1ère page (comme une boucle).
Je vous remercie !
Hi!
I'm just starting out with React Native and I'm really glad I stumbled upon your carousel, it looks great!
I'm having issues when I pass in ScrollViews to the CarouselPager.
I want to be able to scroll vertically when there's text that won't fit on the page.
What I have is essentially something like this:
<CarouselPager>
<ScrollView key={'page0'}><Text>{/* A lot of text */}</Text></ScrollView>
<ScrollView key={'page1'}><Text>{/* A lot of text */}</Text></ScrollView>
<ScrollView key={'page2'}><Text>{/* A lot of text */}</Text></ScrollView>
</CarouselPager>
Behavior:
iOS: Scrolling between the pages works fine but scrolling vertically doesn't work at all
Android: It's possible to scroll vertically but scrolling between the pages isn't as smooth and it "gets stuck"
It's the same thing when I wrap the ScrollViews in Views.
Is there a way to fix this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.