Questions tagged [react-native-image]
160 questions
0
votes
1 answer
Image Load based on state
I want to load an image based on the state which I am getting from API call. For example, if the API gives me '1', I want to load 1.png. Unfortunately I am getting the above error.
Here is my code
let img = info.WeatherIcon ?…

Muhammad Sami
- 520
- 2
- 8
- 21
0
votes
2 answers
React Native: Image "contain" is behaving the same as "cover"
I have the following image that I want to sit as a header in my React Native app:
I want all the text in my to flow behind that header. I've been able to do this with the following code:
import React, { Component } from 'react';
import…

gkeenley
- 6,088
- 8
- 54
- 129
0
votes
1 answer
After migrating to v5 image resize not working
Current Behavior
In react navigation v4 I used this code and worked just fine. It did adjust my logo image (300x80) to fit perfectly and scale into my 80px header.
Now after migrating to v5 it no longer scale. It's just like the 'resizeMode' stopped…

David Bohm
- 21
- 3
0
votes
1 answer
How to display data coming from an API horizontally in react native
Pls, help me out. I want to display my data coming from API horizontally by scrollview but I don't know what I am doing wrong. The data is showing horizontally for every card.
{
return…

Hammad Hassan
- 606
- 7
- 20
0
votes
1 answer
Image component not working on android in react native for android using expo in react-native-image?
react-native-image: how to resolve the issue of image component not working on android in react native for android using expo? I'm trying with below code:

Sandile MHlophe
- 1
- 2
0
votes
2 answers
Unable to add local image
Unable to add a local image.
I tried:
const MyApp = () => {
return(
Some Text
)
}
Also tried:
const MyApp = () => {
return(
…

Somename
- 3,376
- 16
- 42
- 84
0
votes
3 answers
React Native Image resizeMode: difference between 'center' and 'contain'?
If you specify dimensions in the style prop of an component in React Native, adding resizeMode={'contain'} causes the image to preserve its aspect ration and fit entirely in the box whose dimensions you've specified in style. It will also…

RNdev
- 953
- 1
- 8
- 26
0
votes
2 answers
Unable to show multiple images in react native
I am working on a react native application. I have to show multiple images. My code is:
render() {
if (!this.props.data) {
return(Keine Bilder vorhanden )
}
return (

Waleed Naveed
- 2,293
- 2
- 29
- 57
0
votes
1 answer
0
votes
1 answer
How to set text and an icon above the image with separate view in react-native
I need to show a text and icon above the image. But here the image view and text and loading icon need not to be linked. Both need to have a separate view.
I have set two views (one view for image and another one for and add the marginTop:-300…

sejn
- 2,040
- 6
- 28
- 82
0
votes
1 answer
How to show image with grey color which covers the entire image in react-native fast image(not the background entire image)
I need to show an image which the view is in grey color. (i.e) entire screen need to show the grey not the background alone above the image also needs to change. I am using react-native-fast-image package

sejn
- 2,040
- 6
- 28
- 82
0
votes
0 answers
React native, image not scaling - resizeMode has no useful effect
I have code that looks like this:
{siteName}

Alex
- 2,270
- 3
- 33
- 65
0
votes
0 answers
How to get base64 of photos:// path images?
In my project I am retrieving gallery's albums using react-native-photos-framework which giving me gallery's album. Then using those album object I am fetching images of that particular album, which returning assets array. Those assets contains uri…

Kishan Bharda
- 5,446
- 3
- 30
- 57
0
votes
1 answer
Problem in creating asset of local static image using react-native-photos-framework
I am using react-native-photos-framework for creating user defined album and creating assets into device native gallery.
In my app I gives an user defined album creation functionality to user. For that I am displaying a simple modal with input field…

Kishan Bharda
- 5,446
- 3
- 30
- 57
0
votes
2 answers
Image is not showing up or covering the whole available area of the View in react-native-element card component
I want to set up a card from react-native-elements, which has an Image and the title of the card. I want the image to take the whole of the width available in the view and adjust the height keeping the aspect ratio. So basically I have neither…

Piyush Pandey
- 306
- 3
- 17