Questions tagged [imagebackground]

78 questions
2
votes
0 answers

images won't appears using imageBackground in react-native

I would like to dynamically make an image appear on a "ImageBackground". I have a JSON data file which it contains all the paths of the images. I use a flatlist to use all the data from the data file and I use a custom component to format my…
clao260
  • 45
  • 3
2
votes
3 answers

unable set my background image in react native?

I am new to react native, while learning from native docs , I got stuck by ImageBackground usage. My code is given below , help will be appreciated . It was working fine, but when I started using navigator function, its not working as normal.please…
sachin murali
  • 469
  • 2
  • 7
  • 22
2
votes
1 answer

react native back ImageBackground centering

I have an image where i try to center some text on it. For that i use ImageBackground to have child elements of the image. However the image is being scaled down on small devices, and full size if possible When i center my text, it gets centered…
Anders Pedersen
  • 2,255
  • 4
  • 25
  • 49
2
votes
2 answers

React Native Styling inside ImageBackground

I am building an app that makes an invitation Card, I am making the card by using ImageBackground then style the content inside it, but I faced a problem with the different screen size and resolution, my codes are as below:
1
vote
1 answer

React Native iOS ImageBackground resizeMode: 'repeat' is scaling the image. Works fine on Android

I am trying to add image border to my Flatlist items. For that purpose I am using Imagebackground component. But, on iOS, ImageBackground resizeMode: 'repeat' is scaling/stretching the image. It works fine on Android. Here is the snack link.…
artsnr
  • 952
  • 1
  • 10
  • 27
1
vote
1 answer

Huawei MLKit ImageSegmentaion return null value

I'm using Huawei SDK's to erase background from image. Case 1: When using com.huawei.hms:ml-computer-vision-segmentation:2.0.4.300 Everything works perfectly But google play store reject app to stated as Your app contains content that doesn’t comply…
1
vote
1 answer

React Native - Image Background content went past the screen

I am adding image background to my app, but the horizontal part of the image went past the screen (the right and left part got cut). I tried to use resizeMode cover and contain but both of it didn't do anything. Is there any other way to make the…
Dragonarc
  • 73
  • 2
  • 10
1
vote
1 answer

add variable to require in ImageBackground

I am using ImageBackground from react-native lib. ImageBackground using source={require('asd.png')} for example. But I am trying to add variable inside to require. const [image,setImage] = useState('./asd.png') .then(image => { …
newUser
  • 386
  • 5
  • 17
1
vote
1 answer

How should I handle the absolute position when the screen size is different?

I want to use ImageBackground in react-native to show text in a specific location. How can I specify different absolute position for different screen sizes when using resize mode as contain? https://i.stack.imgur.com/HRUwn.png
ezkoon
  • 45
  • 5
1
vote
1 answer

React Native - ImageBackground not showing Image on TvOS

I'm trying to get an image on my tvOS app. But it is not showing up. My URL is https and I've used this same code in Android TV and it works like a charm and when I console.log url it's perfect as well. Follow bellow the behavior: The "pink" image…
pedro.olimpio
  • 1,478
  • 2
  • 22
  • 43
1
vote
2 answers

React native background image is just a white screen

I'm using the ImageBackground component, imported from react-native, but no image is showing. It's just a white screen in the background constructor(props){ super(props) this.backgroundImage = {image: {uri:…
Sam
  • 1,765
  • 11
  • 82
  • 176
1
vote
1 answer

Changing ImageBackground onClick

I have a view with an imageBackground. Under this, I have 3 buttons. I want that, when you click on one of the buttons the imageBackground change. I wanted to use switch case with change of states each time but it didn't work. I'm a little bit…
Kimako
  • 615
  • 2
  • 11
  • 26
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
0 answers

React Native backgroundSize equivalent

I'm trying to position an image similar to how you would with web's backgroundPosition: top. Meaning, if the dimensions of the image are greater than the height and width of the style I'm applying to the image, then it will make sure that the…
Thingamajig
  • 4,107
  • 7
  • 33
  • 61
1
vote
1 answer

Have a fixed that doesn't displace itself when I scroll

I want to have a background image that takes all the screen and stays static when I scroll. I have this component in a React Native project:
Nira
  • 197
  • 1
  • 1
  • 12