Comments (14)
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.
Thanks @zrone for reply.
from react-native-swiper-flatlist.
@SukumarSmart Sorry for the delay, I will take a look to this issue this weekend.
from react-native-swiper-flatlist.
Fixed and released in 1.0.8
Thanks to both of you for found and fix the issue
from react-native-swiper-flatlist.
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.
@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.
@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.
@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.
Create a issue here #42
from react-native-swiper-flatlist.
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.
@gusgard i think this is only happen when autoplay loop is set and we are using remote debugging.
from react-native-swiper-flatlist.
Can someone else confirm that it is only happen when debugging is enabled? So I can close this issue.
from react-native-swiper-flatlist.
call inside componentDidMount or useEffect
if ( imageArray.length !== 0 && imageArray.length !== 1 ) {
scrollRef.current.scrollToIndex({
index: 1,
animated: true,
});
}
from react-native-swiper-flatlist.
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)
- SwiperFlatList is sliding to previous index at initial render without requesting it... HOT 6
- SwiperFlatList not swipeable in gorhom/bottom-sheet on Android HOT 3
- RenderItem is returning index always equal to 0 HOT 2
- How to move pagination (dots) above images HOT 1
- How can i get current Item Value & for the first time load all the component simultaneously HOT 1
- The index will jump to 0 on expo SDK 48 HOT 4
- On scroll to index image is shown with part of next image (Only when data length is bigger than 2) HOT 1
- Error: Requiring unknown module "undefined" HOT 3
- While given scroll to index it is not scroll to 11 it only scroll to 10 when there is 15 data or more HOT 2
- Can't make spacing between 2 sliders HOT 1
- Can't change sliding animation HOT 1
- Nested Swiper Flatlists layout bug HOT 2
- Changing the distance between the dots on Pagination HOT 1
- ScrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed HOT 1
- onChangeIndex called repeatedly when setState in it. HOT 3
- Issue with @types/react 18.2.22 HOT 1
- Setting children width causes glitchy behavior HOT 1
- Getting warning error on swipe left or right HOT 1
- Scrolling disrupted after the 12th item in vertical SwiperFlatList HOT 6
- How to use a Slider Component Within the Swiper? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-swiper-flatlist.