componentWillMount() { StatusBar.setBarStyle('default'); Icon.getImageSource('ios-arrow-back', 30).then((source) => { this.setState({ leftIcon: source }) }); Icon.getImageSource('ios-settings', 30).then((source) => { this.setState({ rightIcon: source }) }); }
componentWillMount() { Icon.getImageSource('android', 36, '#92c029').then((source) => { this.setState({ appLogo: source }) }); }
Promise.all( Object.keys(icons).map(iconName => // IconName--suffix--other-suffix is just the mapping name in iconsMap Ionicons.getImageSource( iconName.replace(replaceSuffixPattern, ''), icons[iconName][0], icons[iconName][1] )) ).then(sources => { Object.keys(icons) .forEach((iconName, idx) => (iconsMap[iconName] = sources[idx])); // Call resolve (and we are done) resolve(true); });
componentWillMount() { const {selectedColor, normalColor} = this.props; Icon.getImageSource('md-home', 50, normalColor).then((source) => this.setState({ homeNormal: source })); Icon.getImageSource('md-home', 50, selectedColor).then((source) => this.setState({ homeSelected: source })); Icon.getImageSource('md-person', 50, normalColor).then((source) => this.setState({ meNormal: source })); Icon.getImageSource('md-person', 50, selectedColor).then((source) => this.setState({ meSelected: source })); Icon.getImageSource('md-compass', 50, normalColor).then((source) => this.setState({ compassNormal: source })); Icon.getImageSource('md-compass', 50, selectedColor).then((source) => this.setState({ compassSelected: source })); }
Icon.getImageSource("md-map", 30), Icon.getImageSource("md-share-alt", 30), Icon.getImageSource("md-menu", 30) ]).then((sources) => { const mainView = {
const startTabs = () => { Promise.all([ Icon.getImageSource(Platform.OS === 'android' ? 'md-map' : 'ios-map', 30), Icon.getImageSource(Platform.OS === 'android' ? 'md-share-alt' : 'ios-share', 30), Icon.getImageSource(Platform.OS === 'android' ? 'md-menu' : 'ios-menu', 30) ]).then(sources => { Navigation.startTabBasedApp({
constructor(props) { super(props); this.state = { userIcon: null, showError: false, errorText: null }; Icon.getImageSource('user', 50, '#999').then((source) => { this.setState({ userIcon: source }) }) }