Comments (3)
Hi dear,
You can use ImageComponent prop to create your own custom Image Component and then pass it to the SliderBox. also you can use FastImage object and pass it to ImageComponent prop too.
import FastImage from 'react-native-fast-image';
<SliderBox
ImageComponent={FastImage}
images={this.state.images}
sliderBoxHeight={200}
onCurrentImagePressed={index =>
console.warn(image ${index} pressed
)
}
from react-native-image-slider-box.
I did not understand because my images appear normally but does not apply resizeMode.
My code.
resizeMode = () => (
<FastImage
resizeMode={FastImage.resizeMode.contain}
source={{ uri: this.getImages() }}
/>
);
<SliderBox
ImageComponent={this.resizeMode()}
images={this.getImages()}
sliderBoxHeight={350}
dotColor={colors.WHITE}
inactiveDotColor={colors.DARK_GRAY}
paginationBoxVerticalPadding={20}
/>
from react-native-image-slider-box.
@Dr1992 , @Miiiiii7 @intellidev1991 , I didn't get how to apply contain to resizeMode, could you please let me know if that worked for you.
from react-native-image-slider-box.
Related Issues (20)
- Prevent current dot from being larger and prevent touchable opacity flash HOT 1
- How can I hide dots? HOT 2
- pagination not reset when loading new images
- Was hoping you could give the usage examples with Function components HOT 1
- How can i add left and right arrows to make the images slide
- Set active image
- Is it possible to extend the props from Image like BlurRadis? HOT 4
- ViewPropTypes error HOT 19
- Bug on autoplay HOT 1
- TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[5], "react-native-image-slider-box").SliderBox') HOT 1
- ViewPropTypes has been removed from React Native HOT 6
- No way to remove Padding/Animation between images
- TypeError: Cannot read property 'SliderBox' of undefined HOT 16
- Native component for "RCTScrollContentView" does not exist
- ViewPropTypes Error. HOT 1
- error Unable to resolve | export * from "./dist"; HOT 1
- Circle Loop Bug HOT 6
- Active Dot Style HOT 2
- circleLoop not working properly HOT 3
- Request for AVIF Image Format Support
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-image-slider-box.