Giter Club home page Giter Club logo

Comments (14)

zrone avatar zrone commented on May 26, 2024

Hello, I found the same iusse in Android and I modify the source code to support android. may be can help you. Insert code to number 116.
if(Platform.OS === "android") { this._autoplay(index) }
reason of the question: It's not auto run Android for func onMomentumScrollEnd when exec scrollToIndex, you must be dispatch it yourself.

from react-native-swiper-flatlist.

SukumarSmart avatar SukumarSmart commented on May 26, 2024

Thanks @zrone for reply.

from react-native-swiper-flatlist.

gusgard avatar gusgard commented on May 26, 2024

@SukumarSmart Sorry for the delay, I will take a look to this issue this weekend.

from react-native-swiper-flatlist.

gusgard avatar gusgard commented on May 26, 2024

Fixed and released in 1.0.8

Thanks to both of you for found and fix the issue

from react-native-swiper-flatlist.

jigaroza287 avatar jigaroza287 commented on May 26, 2024

Hi,
I am still facing the autoplay issue, it seems it's scrolling very fast on Android. Here is my code:
Note: "images" is an Array of URL strings

<View style={styles.sliderContainer}>
  <SwiperFlatList
    autoplay
    autoplayDelay={3}
    autoplayLoop
    showPagination
    data={images}
    renderItem={this._renderImageSliderItems}
  />
</View>

_renderImageSliderItems = ({ item }) => {
  return (
    <View>
      <ImageLoad
        style={this.state.sliderImage}
        isShowActivity={false}
        source={{ uri: item }}
      />
    </View>
  );
};

from react-native-swiper-flatlist.

IntelliJAbhishek avatar IntelliJAbhishek commented on May 26, 2024

@jigaroza287 auto play is very fast even if autoplaydelay set to 10. This problem occurs when we have images uri.

Any fix for that?

from react-native-swiper-flatlist.

jigaroza287 avatar jigaroza287 commented on May 26, 2024

@IntelliJAbhishek no, I didn't find any solution.
The problem does not occur for all the Android devices. I found it working on most of the Androids, a few, particularly I tested on a iBall Android Tablet with Android 6.0, Marshmallow, it has the same behaviour as you said, autoplay is too fast regardless of whatever delay you provide.

from react-native-swiper-flatlist.

IntelliJAbhishek avatar IntelliJAbhishek commented on May 26, 2024

@jigaroza287 I'm also getting same behaviour in marshmallow. We better need to open a new issue for this. As this one is already closed so author wont care much about this

from react-native-swiper-flatlist.

IntelliJAbhishek avatar IntelliJAbhishek commented on May 26, 2024

Create a issue here #42

from react-native-swiper-flatlist.

gusgard avatar gusgard commented on May 26, 2024

In what version of Android is this reproducible? Can I reproduce it in an emulator or needs to be a real device? Did you try using FastImage https://github.com/DylanVann/react-native-fast-image instead of Image

from react-native-swiper-flatlist.

IntelliJAbhishek avatar IntelliJAbhishek commented on May 26, 2024

@gusgard i think this is only happen when autoplay loop is set and we are using remote debugging.

from react-native-swiper-flatlist.

gusgard avatar gusgard commented on May 26, 2024

Can someone else confirm that it is only happen when debugging is enabled? So I can close this issue.

from react-native-swiper-flatlist.

chahalrohit avatar chahalrohit commented on May 26, 2024

call inside componentDidMount or useEffect
if ( imageArray.length !== 0 && imageArray.length !== 1 ) {
scrollRef.current.scrollToIndex({
index: 1,
animated: true,
});
}

from react-native-swiper-flatlist.

Vishwa-33 avatar Vishwa-33 commented on May 26, 2024

import { View, Text, FlatList,Image } from 'react-native'
import React from 'react';
import { useState } from 'react';
import { SwiperFlatList } from 'react-native-swiper-flatlist';

import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen';

const image1 =require('../component/constants/banner_image_min.jpg');
const image2 =require('../component/constants/banner.jpg');
const image3 =require('../component/constants/banner_image_min.jpg');

const image4 =require('../component/constants/banner_image_min.jpg');

const Sample = () => {

const [data,setData] = useState([

    {
        items:[
            image1,
            image2,
            image3,
            image4,

        ]
    }

]


)

return (

<SwiperFlatList
autoplay
autoplayDelay={2}
autoplayLoop
showPagination
index={2}
data={data[0].items}
pagingEnabled
horizontal
// removeClippedSubviews

  renderItem={({item,index})=>{
    return <Image source={item} style={{width:wp(100),height:hp(22),marginTop:100}} />
  }

  }
  />
</View>

)
}

export default Sample

its working..⏰👀

from react-native-swiper-flatlist.

Related Issues (20)

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.