Image besides `stretch` & `cover` don't work at all on Android
See original GitHub issueThere is already an identical issue for this, however it’s been locked and marked resolved even though it’s clearly not (at least in React-Native@0.57.1
) which prevents discussion of that issue there.
I’m not sure whether this is a bug in React-Native or an oversight in the documentations, but resizeModes
don’t work on Android except for stretch
and cover
, which appear to generate identical results in most (all?) cases.
Do we need to update the documentation here to state that certain modes are only supported on iOS, or are these modes supposed to work on Android?
I’ve been working on this for 2 hours and any use of contain
or center
causes any and all images to fail to render regardless of styling/positioning of the <Image />
and the containing <View />
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Did you tried to pass resizeMode as Image prop?
@dulmandakh I did try as both a
prop
onImage
and in the styles. I tried each way using string values for"contain"
and"center"
as well as{Image.resizeMode.center}
and{Image.resizeMode.contain}
, which I’d seen referenced online but which are actuallyundefined
The behavior is always identical – works on iOS, but does not render on Android.
Android - “contain”
iOS - “contain”