mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-10 17:33:36 +08:00
Support bundle argument for image loading
Reviewed By: mmmulani Differential Revision: D3768798 fbshipit-source-id: 5b35f06957cebfe74aca90fe6a456f7f739509a9
This commit is contained in:
committed by
Facebook Github Bot 3
parent
74308209f9
commit
46b54fd7a8
@@ -613,11 +613,39 @@ exports.examples = [
|
||||
return (
|
||||
<Image
|
||||
source={require('image!LegacyImage')}
|
||||
style={styles.base}
|
||||
/>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Bundled images',
|
||||
description:
|
||||
'Images shipped in a separate native bundle',
|
||||
render: function() {
|
||||
return (
|
||||
<View style={{flexDirection: 'row'}}>
|
||||
<Image
|
||||
source={{
|
||||
url: 'ImageInBundle',
|
||||
bundle: 'UIExplorerBundle',
|
||||
width: 100,
|
||||
height: 100,
|
||||
}}
|
||||
style={{borderColor: 'yellow', borderWidth: 4}}
|
||||
/>
|
||||
<Image
|
||||
source={{
|
||||
url: 'ImageInAssetCatalog',
|
||||
bundle: 'UIExplorerBundle',
|
||||
width: 100,
|
||||
height: 100,
|
||||
}}
|
||||
style={{marginLeft: 10, borderColor: 'blue', borderWidth: 4}}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
var fullImage = {uri: 'http://facebook.github.io/react/img/logo_og.png'};
|
||||
|
||||
Reference in New Issue
Block a user