i'm using navigator component in react-native.
//... render() { return ( <navigator ref="navigator" navigationbar={this.renderheader()} scenestyle={styles.container} initialroute={{type: 'home'}} renderscene={this.renderscene.bind(this)} /> ); } now need set background image fixed scenes, can't wrap navigator component inside view.
// no errors background ignored render() { return ( <view style={styles.navigatorcontainer}> <image source={require('image!logo-big')} style={styles.background} /> <navigator ref="navigator" navigationbar={this.renderheader()} scenestyle={styles.container} initialroute={{type: 'home'}} renderscene={this.renderscene.bind(this)} /> </view> ); } var styles = stylesheet.create({ container: { flex: 1 }, background: { position: 'absolute', left: 0, top: 0, width: 1024, height: 768 }, navigatorcontainer: { flex: 1, backgroundcolor: '#ff0000' } }); if set backgroundcolor class navigatorcontainer, can see red background doesn't work image.
any suggestions?
found fix: show background image must set navigatorcontainer's backgroundcolor 'transparent'.
Comments
Post a Comment