diff --git a/Examples/Movies/MoviesApp.android.js b/Examples/Movies/MoviesApp.android.js index 40368d414..c6f78a3d1 100644 --- a/Examples/Movies/MoviesApp.android.js +++ b/Examples/Movies/MoviesApp.android.js @@ -1,4 +1,11 @@ /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * * The examples provided by Facebook are for non-commercial testing and * evaluation purposes only. * @@ -18,6 +25,8 @@ var React = require('react'); var ReactNative = require('react-native'); + +var nativeImageSource = require('nativeImageSource'); var { AppRegistry, BackAndroid, @@ -50,7 +59,11 @@ var RouteMapper = function(route, navigationOperations, onComponentRef) { this.refs.input && this.refs.input.focus()}> diff --git a/Examples/UIExplorer/js/ImageCapInsetsExample.js b/Examples/UIExplorer/js/ImageCapInsetsExample.js index 5331026ae..513a521ee 100644 --- a/Examples/UIExplorer/js/ImageCapInsetsExample.js +++ b/Examples/UIExplorer/js/ImageCapInsetsExample.js @@ -25,6 +25,8 @@ var React = require('react'); var ReactNative = require('react-native'); + +var nativeImageSource = require('nativeImageSource'); var { Image, StyleSheet, @@ -41,7 +43,11 @@ class ImageCapInsetsExample extends React.Component { capInsets: none { this.props.onTabIndex(0); @@ -83,7 +89,11 @@ class JumpingNavBar extends React.Component { { this.props.onTabIndex(1); @@ -92,7 +102,11 @@ class JumpingNavBar extends React.Component { { this.props.onTabIndex(2); diff --git a/Examples/UIExplorer/js/NavigatorIOSExample.js b/Examples/UIExplorer/js/NavigatorIOSExample.js index e84f6a49a..224b280fd 100644 --- a/Examples/UIExplorer/js/NavigatorIOSExample.js +++ b/Examples/UIExplorer/js/NavigatorIOSExample.js @@ -25,7 +25,9 @@ const React = require('react'); const ReactNative = require('react-native'); const ViewExample = require('./ViewExample'); + const createExamplePage = require('./createExamplePage'); +const nativeImageSource = require('nativeImageSource'); const { AlertIOS, NavigatorIOS, @@ -107,7 +109,11 @@ class NavigatorIOSExamplePage extends React.Component { component: EmptyPage, leftButtonTitle: 'Custom Left', onLeftButtonPress: () => this.props.navigator.pop(), - rightButtonIcon: require('image!NavBarButtonPlus'), + rightButtonIcon: nativeImageSource({ + ios: 'NavBarButtonPlus', + width: 17, + height: 17 + }), onRightButtonPress: () => { AlertIOS.alert( 'Bar Button Action', diff --git a/Examples/UIExplorer/js/ToolbarAndroidExample.android.js b/Examples/UIExplorer/js/ToolbarAndroidExample.android.js index 8ae9aab28..942740175 100644 --- a/Examples/UIExplorer/js/ToolbarAndroidExample.android.js +++ b/Examples/UIExplorer/js/ToolbarAndroidExample.android.js @@ -24,6 +24,8 @@ var React = require('react'); var ReactNative = require('react-native'); + +var nativeImageSource = require('nativeImageSource'); var { StyleSheet, Text, @@ -54,7 +56,11 @@ class ToolbarAndroidExample extends React.Component { this.setState({actionText: 'Icon clicked'})} style={styles.toolbar} @@ -64,7 +70,11 @@ class ToolbarAndroidExample extends React.Component { this.setState({colorProps: {}})} title="Wow, such toolbar" style={styles.toolbar} @@ -125,9 +147,17 @@ class ToolbarAndroidExample extends React.Component { } var toolbarActions = [ - {title: 'Create', icon: require('image!ic_create_black_48dp'), show: 'always'}, + {title: 'Create', icon: nativeImageSource({ + android: 'ic_create_black_48dp', + width: 96, + height: 96 + }), show: 'always'}, {title: 'Filter'}, - {title: 'Settings', icon: require('image!ic_settings_black_48dp'), show: 'always'}, + {title: 'Settings', icon: nativeImageSource({ + android: 'ic_settings_black_48dp', + width: 96, + height: 96 + }), show: 'always'}, ]; var styles = StyleSheet.create({ diff --git a/Examples/UIExplorer/js/UIExplorerApp.android.js b/Examples/UIExplorer/js/UIExplorerApp.android.js index 1721dfab7..c9359589c 100644 --- a/Examples/UIExplorer/js/UIExplorerApp.android.js +++ b/Examples/UIExplorer/js/UIExplorerApp.android.js @@ -42,6 +42,8 @@ const UIManager = require('UIManager'); const URIActionMap = require('./URIActionMap'); const View = require('View'); +const nativeImageSource = require('nativeImageSource'); + import type {UIExplorerNavigationState} from './UIExplorerNavigationReducer'; UIManager.setLayoutAnimationEnabledExperimental(true); @@ -152,8 +154,16 @@ class UIExplorerApp extends React.Component { return ( this.drawer.openDrawer()} style={styles.toolbar} title={title} @@ -168,8 +178,16 @@ class UIExplorerApp extends React.Component { return ( this.drawer.openDrawer()} style={styles.toolbar} title={title}