我使用的反應本地+本土基地和正在使用一個簡單的佈局 - 頁眉內容腳註。我在該部分中使用MapView,我希望地圖填充內容區域。如果我在MapView的樣式中指定寬度和高度,則地圖顯示正常。如果我設置的樣式的MapView的彎曲:1的地圖顯示不出來react-native + native-base。請填寫MapView類區域<Content>
這裏是我的代碼。所有我想要的是地圖,以填補內容..
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
MapView
} from 'react-native';
import { Container, Header, Title, Content, Footer, FooterTab, Button, Icon } from 'native-base';
class Project extends Component {
render() {
return (
<Container>
<Header>
<Title>TEST</Title>
</Header>
<Content>
<MapView
style={styles.map}
showsUserLocation={true}
/>
</Content>
<Footer>
<FooterTab>
<Button transparent>
<Icon name='ios-call' />
</Button>
</FooterTab>
</Footer>
</Container>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
map:{
flex:1
}
});
AppRegistry.registerComponent('Project',() => Project);
NativeBase會盡快給你一個解決方案。 –
你找到答案了嗎?同樣的問題在這裏,並在Android 4.4,genymotion真正的設備,標題不會出現 –
不,我沒有找到答案 –