Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion packages/rn-tester/js/examples/Image/ImageExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ import RNTesterText from '../../components/RNTesterText';
import ImageCapInsetsExample from './ImageCapInsetsExample';
import React from 'react';
import {useEffect, useState} from 'react';
import {Image, ImageBackground, StyleSheet, Text, View} from 'react-native';
import {
Image,
ImageBackground,
Platform,
StyleSheet,
Text,
View,
} from 'react-native';

const IMAGE1 =
'https://www.facebook.com/assets/fb_lite_messaging/E2EE-settings@3x.png';
Expand Down Expand Up @@ -1013,6 +1020,16 @@ exports.examples = [
{
title: 'Error Handler for Large Images',
render: function (): React.Node {
if (Platform.OS === 'android' && parseInt(Platform.Version, 10) < 27) {
return (
<View>
<RNTesterText>
Large images are only supported on Android API 27+
</RNTesterText>
</View>
);
}

return (
<NetworkImageExample
resizeMethod="none"
Expand Down Expand Up @@ -1703,6 +1720,16 @@ exports.examples = [
'Demonstrating the effects of loading a large image with different resize methods',
scrollable: true,
render: function (): React.Node {
if (parseInt(Platform.Version, 10) < 27) {
return (
<View>
<RNTesterText>
Large images are only supported on Android API 27+
</RNTesterText>
</View>
);
}

const methods: Array<ImageProps['resizeMethod']> = [
'auto',
'resize',
Expand Down
Loading