Coder Social home page Coder Social logo

geek-prince / react-native-page-scrollview Goto Github PK

View Code? Open in Web Editor NEW
73.0 73.0 25.0 17 KB

对ScrollView的封装,可以很方便的实现水平,垂直分页轮播效果.而且可以自定义分页宽高,和侧边View的旋转,透明度,大小等.

License: MIT License

JavaScript 100.00%

react-native-page-scrollview's People

Contributors

geek-prince avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-page-scrollview's Issues

Invariant Violation: [657,"RCTView",81,{"width":"<<NaN>>","height":0,"backgroundColor":0}] is not usable as a native method argument

截屏2020-06-23下午2 44 47
截屏2020-06-23下午2 45 07
截屏2020-06-23下午2 45 35
有截图但是好像我这边预览不到,提交下代码
render() {
let imgArr = [
{
uri:
'https://img.xyj321.com/attatch/2020061510_bc7597875cb6444d2131d23f5e7fde39.jpg',
},
];
return (
<PageScrollView
style={{width: deviceDpWidth, height: (deviceDpWidth / 16) * 9}}
builtinStyle="sizeChangeMode"
builtinWH={{width: 300, height: (300 / 16) * 9}}
imageArr={imgArr}
/>)}

"react": "16.9.0",
"react-native": "0.61.4",

不管什么样式都是这个问题,直接copy的代码还是这个错误;设置没设置builtinWH,style都是一样的问题

感谢贴

感谢作者开源,ORZ
安装了您的插件后 按住第一张图片滑动到第二张,松手又弹回去了,imageArr的数据是在componentDidMount里面发送网络请求异步获取的,render里面是
//// {this.state.bannerList && <PageScrollView style={{width:width,height:140}}
//// imageArr ={this.state.bannerList} />}
请问是什么原因呢 期待您的回答

高级轮播-自定义View

当我滑动自定义的View的时候{size,opacity,rotate,skew}返回全部都变成NaN了
代码 <PageScrollView
style={{width:w,height:100,margin:10}}
sizeSmall={0.5}
opacitySmall={0.6}
rotateDeg={30}
skewDeg={45}
datas={[1,2,3]}
currentPageChangeFunc={(e)=>console.log(e)}
view={(i,data,{size,opacity,rotate,skew})=>{
console.log(i,data,{size,opacity,rotate,skew})
this.r = Math.floor(Math.random()*255);
this.g = Math.floor(Math.random()*255);
this.b = Math.floor(Math.random()*255);
let color = 'rgba('+ this.r +','+ this.g +','+ this.b +',0.8)';
return(

                <View style={{width:w*size,height:60*size,justifyContent:'center',alignItems:'center',backgroundColor:color}}>
                  <Text>{i}</Text>
                </View>


            );
        }}
      />

起始页怎么设置?

我想设置一打开就显示第二个page 但我不知道哪个属性可以设置,请问有解决方法吗?

高级样式不支持Android吗?

在Android设备上运行
<PageScrollView
style={{ width : SCREEN_WIDTH, height : SCREEN_WIDTH / 16 * 9 }}
builtinStyle='sizeChangeMode'
builtinWH={{ width : 300, height : 300 / 16 * 9 }}
imageArr={this.imgArr}/>
两边小部分空白的

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.