Questions tagged [react-native-image]

160 questions
1
vote
2 answers

react-native-image-slider-box with dotStyle above image Slider not working

In this example i have used react-native-image-slider here i want to show image pagination dots at left side bottom image slider box how to do like that. SliderBoxExample.js import React, { Component } from 'react'; import {Image, Text, View,…
Windas_Coder
  • 21
  • 1
  • 4
1
vote
0 answers

React native app loads url images slowly when opened the first time or when all data cleared

I have a react native app where in the home page I need to fetch the settings and then set the image as banner as per the response of settings. Until the settings is fetched, I use local image to display as banner. My problem here is that when I…
Kush
  • 644
  • 1
  • 12
  • 30
1
vote
1 answer

Using a placeholder image in react native without state manipulation

So the part below is a code snippet. These images are rendered in a flatlist. Now…
1
vote
2 answers

React native image component not switching between local image and uri when props change

I have an avatar component and inside it it has the following XML
Adam Katz
  • 6,999
  • 11
  • 42
  • 74
1
vote
0 answers

The react-native image picker should maintain its image even after navigation

Actually i am using react-native image picker and there are different pages. So when i load a image in react-native image picker and navigate to different page and comeback to the same the image is no longer exist. I want that image which was loaded…
1
vote
2 answers

React Native: how to make View inside ImageBackground have 100% width but with horizontal padding?

I have the following screen in my React Native app: The blue black and white background is an ImageBackground, and the green strip in the middle is a View. The code is:
gkeenley
  • 6,088
  • 8
  • 54
  • 129
1
vote
1 answer

How to dynamically set borderRadius on React Native component?

I'm trying to display images with round borders in a FlatList. However, I'm using flex, so I don't know the absolute value to put in borderRadius. This is what I tried: function Row(obj) { const [width, setWidth] = useState(0); return ( …
1
vote
2 answers

React Native: Why is image stretching vertically to fill container and how to prevent it?

In my React Native app, I have a red box of height 300 that I want to center vertically, and an image that I want to sit inside and at the top of this red box. Here is my code so far: import React, { Component } from 'react'; import { View, Image}…
gkeenley
  • 6,088
  • 8
  • 54
  • 129
1
vote
1 answer

How can I adapt the width of an Image retrieved by URL to a View container in React Native?

I would like to retrieve an image from an url, and insert it inside a View adapting the size to the container. This is an expo where I tried to do it. https://snack.expo.io/Hk1rsfaHU How you can see there are 3 columns having the same width(flex 1),…
limdev
  • 706
  • 1
  • 5
  • 18
1
vote
1 answer

The image displayed in marker callout is cut

In my app, I want to display callout on a user clicks on the marker. I read that there are problems with displaying images in callout and a lot of people suggest placing the image in component [1,2,3]. For smaller images/icons this solution …
Panicum
  • 794
  • 1
  • 9
  • 32
1
vote
1 answer

Unable to render image from local path on IOS in ReactNative

I am working on a react native application. I am testing it on IOS simulator. I upload images in the application and images get stored on some local path, but when i come back to screen i am unable to show the image, the images space is there but…
Waleed Naveed
  • 2,293
  • 2
  • 29
  • 57
1
vote
0 answers

React Native: Image not being cropped properly from bottom issue:

We are facing image issue with our code in react native application. We have put image in our react native code with Image tag in code. We have set size - height and width of the image to 150, let’s say. Our problem is that when I reduce the height…
1
vote
1 answer

Why image from JSON is not rendered in image tag in react native?

I have a json file { "name": "SAM", "id": "001", "default_image":"../assets/image.jpeg" } In my component, I set a state called profile_image with this data called default_image, but when I use it like this, it throws an…
Saurav Dutta
  • 157
  • 3
  • 9
1
vote
2 answers

React Native how replace image url on error?

I have an app which displays multiple images which I load from the API. Now the problem is some of the images are expired which is causing a problem on Android, in Android the screen starts lagging as soon as the expired image loads on the screen. I…
1
vote
2 answers

react-native-image-viewer - Landscape View didn't work on IOS

On Android, Landscape-Mode works like a charm, but on IOs I've found following issue: Mobile-Device is in Landscape-Mode: I click on an Image (Touchable-Opacity set the state modalShow The Landscape-Mode will be switched to Portrait-Mode, after…
suther
  • 12,600
  • 4
  • 62
  • 99