yjy5264 / react-native-card-carousel Goto Github PK
View Code? Open in Web Editor NEWinfinite card style carousel for react-native project
License: MIT License
infinite card style carousel for react-native project
License: MIT License
正是我需要的,先看看源码,再用一下~
like this
<ScrollView
style = {{width: this.moveDistance, height: this.height, position: 'absolute', left: (this.width-this.moveDistance)/2, top: 0}}
horizontal = {true}
pagingEnabled = {true}
ref = {ref => this.assistScroll = ref}
onScroll = {e => this._onAssistScroll(e)}
scrollEventThrottle = {16}
showsHorizontalScrollIndicator = {false}
// stop timer when dragging
onScrollBeginDrag = {() => this._stopInterval()}
// start timer when dragging end
onScrollEndDrag = {() => this._startInterval()}
>
{this._getView()}
</ScrollView>
能否加个自动轮播功能,目前看到源码好像没这个实现。
本人能力有限实现起来有难度,能否麻烦请楼主实现个?
Thanks for writing this nice component. One improvement - make the styles configurable through properties that get passed by parent component. I see right now the height, width, shadow etc are all hard-coded or determined within the component based on device height, width etc. It will be better if parent component can pass the required styles from outside and this component simply honor those.
For instance, I want cards to be of half a screen, but as right now its determined inside and its hard-coded as 250 px, I can not have a card of variable height.
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.