Thomas Charlesworth
Thomas Charlesworth

Reputation: 1839

React-Native alignItems: "flex-end" does not work inside an <Image> tag

I have a TouchableOpacity contained inside an Image which I am using to present a background for my application.

The issue is when I'm trying to align my TouchableOpacity to something like center or flex-end it does not work inside an Image tag. The TouchableOpacity simply disappears...

Demonstration of the issue:

enter image description here

Here I tried with a View instead of an Image It works... enter image description here

Upvotes: 2

Views: 1244

Answers (1)

Thomas Charlesworth
Thomas Charlesworth

Reputation: 1839

I realised the issue.

Must set:

width: null,
height: null,

to the Image tag.

Upvotes: 1

Related Questions