【问题标题】:How to control speed of slider in react-native-image-slider-box lib如何控制 react-native-image-slider-box 库中滑块的速度
【发布时间】:2020-06-19 12:57:10
【问题描述】:

每个人。 我正在构建 expo 应用程序并使用 react-native-image-slider-box npm lib 添加了滑块图像。 但是没有改变滑块速度的想法...... 有什么解决方案吗?为此使用另一个库会很棒。

谢谢。

import { SliderBox } from 'react-native-image-slider-box';


        <SliderBox
          images={sliderImages}
          autoplay
          circleLoop
          disableOnPress
          paginationBoxVerticalPadding={30}
          ImageComponentStyle={{
            width,
            height: normalizeSize(450)
          }} />

【问题讨论】:

    标签: react-native expo react-native-image


    【解决方案1】:

    添加这个

    <SliderBox
    autoplayInterval={3000}
    ........
    />
    

    【讨论】:

      【解决方案2】:

      react-native-image-slider-box 正在使用 react-native-snap-carousel 来编辑 Slider 按照步骤 node_modules -> react-native-image-slider-box -> dist并编辑 SliderBox.js 文件并添加

       <Carousel
              ......
              autoplayInterval={15000}
      

      【讨论】:

        猜你喜欢
        • 2021-01-13
        • 2022-01-23
        • 1970-01-01
        • 2021-02-08
        • 2017-08-08
        • 1970-01-01
        • 1970-01-01
        • 2015-02-09
        • 1970-01-01
        相关资源
        最近更新 更多