123456789101112131415 |
- /**
- * Created by zack on 2017/5/2.
- */
- import {Dimensions, Platform} from 'react-native'
- import ExtraDimensions from 'react-native-extra-dimensions-android'
- import NavigationBarHeight from './NavigationBarHeight'
- import TabBarHeight from './TabBarHeight'
-
- const ScreenDimensions = {
- width: (Platform.OS === 'ios') ? Dimensions.get('window').width : ExtraDimensions.get('REAL_WINDOW_WIDTH'),
- height: (Platform.OS === 'ios') ? Dimensions.get('window').height : (ExtraDimensions.get('REAL_WINDOW_HEIGHT') - ExtraDimensions.get('STATUS_BAR_HEIGHT') - ExtraDimensions.get('SOFT_MENU_BAR_HEIGHT')),
- clientHeight:((Platform.OS === 'ios') ? Dimensions.get('window').height : (ExtraDimensions.get('REAL_WINDOW_HEIGHT') - ExtraDimensions.get('STATUS_BAR_HEIGHT') - ExtraDimensions.get('SOFT_MENU_BAR_HEIGHT'))) - NavigationBarHeight.height - TabBarHeight.height
- }
-
- export default ScreenDimensions
|