styles.js 731 B

12345678910111213141516171819202122232425262728293031323334
  1. import { StyleSheet,Platform,StatusBar,Dimensions } from 'react-native';
  2. const {width,height} = Dimensions.get('window');
  3. {/*如果UI设计师的原型图是以6S为基准,6S的屏幕宽度为1334像素,那么算出缩放比例*/}
  4. let scale = width/1334;
  5. let navHeight = Platform.OS === 'ios' ? 128*scale : StatusBar.currentHeight + 40*scale;
  6. const styles = StyleSheet.create({
  7. page:{
  8. flex:1,
  9. backgroundColor:'#e5e5e5',
  10. },
  11. container: {
  12. flex: 1,
  13. backgroundColor: '#e5e5e5',
  14. alignItems: 'center',
  15. justifyContent: 'center',
  16. },
  17. list:{
  18. height:50,
  19. marginBottom:10,
  20. },
  21. item:{
  22. height:50
  23. }
  24. })
  25. export default styles;