我有两个视图,一个堆叠在另一个之上。
模拟器中的截图:
What I see on my phone:
从屏幕上可以看出,模拟器版本很好,但我有一个两个视图之间的白线在我的手机上。代码如下:
import React, { Component } from 'react';
import {
Text,
View,
StyleSheet,
} from 'react-native';
class FlightSearch extends Component {
render() {
return (
<View style={styles.pageRoot}>
<View style={styles.navSection}></View>
<View style={styles.searchSection}>
<View style={styles.locationSection}></View>
<View style={styles.searchParametersSection}></View>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
pageRoot: {
flex: 1,
flexDirection: 'column',
},
navSection: {
backgroundColor: '#368ec7',
flex: 25,
alignSelf: 'stretch'
},
searchSection: {
flex: 75,
alignSelf: 'stretch',
},
locationSection: {
flex: 30,
backgroundColor: '#276fa3',
padding: 10,
paddingLeft: 20,
paddingRight: 20,
borderBottomWidth: 1,
borderBottomColor: '#205e8c'
},
searchParametersSection : {
flex: 70,
backgroundColor: 'rgba(41,123,184,1)',
borderTopWidth: 1,
borderTopColor: 'rgba(69, 140, 194, 0.7)',
flexDirection: 'column'
}
});
export default FlightSearch;