You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2020. It is now read-only.
If i click, the arrow button on left and right slider will work correctly and also the bullet dot page indicators changing correctly, but if i swipe via hands to next slide, The paging dot indicators does not changes.
The text was updated successfully, but these errors were encountered:
I had to change the component to make it work.
To scroll as a slider when dragging (currently you can scroll the images partially) I had to add pagingEnabled to the ScrollView component.
Secondly, when the scroll is finished I had to update the bullets (the thing you were asking for).
For this I added two handlers for the ScrollView:
onScrollCustom = (e) =>{
let contentOffset = e.nativeEvent.contentOffset;
let viewSize = e.nativeEvent.layoutMeasurement;
let pageNum = Math.floor(contentOffset.x / viewSize.width);
console.log('New page ', pageNum);
this.setState({position: pageNum});
}
We need to calculate the current slide in order to update correctly the active bullet.
That's it!
I know the solution is workaround-ish, but the component needs some polishing.
The changes were made to a local component, to avoid overriding the changes by an eventual update.
If i click, the arrow button on left and right slider will work correctly and also the bullet dot page indicators changing correctly, but if i swipe via hands to next slide, The paging dot indicators does not changes.
The text was updated successfully, but these errors were encountered: