Skip to content

Commit

Permalink
fix(header): Alignment on android now consistent with iOS (#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
iRoachie committed Feb 25, 2018
1 parent 62733cd commit d2eaaba
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/header/Header.js
@@ -1,13 +1,15 @@
import React from 'react';
import PropTypes from 'prop-types';
import { StatusBar, StyleSheet, View } from 'react-native';
import { Platform, StatusBar, StyleSheet, View } from 'react-native';
import isEmpty from 'lodash.isempty';
import DummyNavButton from './DummyNavButton';
import NavButton from './NavButton';
import Title from './Title';
import ViewPropTypes from '../config/ViewPropTypes';
import colors from '../config/colors';

const androidStatusBarHeight = 24;

function generateChild(value, type) {
if (React.isValidElement(value)) {
return <View key={type}>{value}</View>;
Expand Down Expand Up @@ -92,14 +94,14 @@ const styles = StyleSheet.create({
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'flex-end',
alignItems: Platform.OS === 'ios' ? 'flex-end' : 'center',
},
outerContainer: {
backgroundColor: colors.primary,
borderBottomColor: '#f2f2f2',
borderBottomWidth: 1,
padding: 15,
height: 70,
padding: Platform.OS === 'ios' ? 15 : 10,
height: Platform.OS === 'ios' ? 70 : 70 - androidStatusBarHeight,
},
});

Expand Down

0 comments on commit d2eaaba

Please sign in to comment.