Skip to content

Commit

Permalink
fix visibility issue on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoima525 committed Dec 17, 2017
1 parent e6aa158 commit 417012e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
4 changes: 1 addition & 3 deletions js/components/DetailComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import {View, Text, StyleSheet} from "react-native";

const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
backgroundColor: 'white',
marginTop: 10,
},
textLayout: {
padding: 10,
padding: 10,
backgroundColor: '#FFFFFF'
backgroundColor: 'white',
},
});

Expand Down
18 changes: 3 additions & 15 deletions js/components/common/BackButton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { HeaderBackButton } from 'react-navigation';
import PropTypes from 'prop-types';
import { Platform, View, StyleSheet, TouchableHighlight, TouchableNativeFeedback, Text } from 'react-native';
import { View, StyleSheet, TouchableHighlight, TouchableNativeFeedback, Text } from 'react-native';

// Component for Back Buttons

Expand All @@ -27,23 +27,11 @@ BaseBackButton.propTypes = {
backTitle: PropTypes.string.isRequired,
};

export const BackButtonAndroid = (props, context) => (
<BaseBackButton
onPress={() => safeBackOnPress(props.onPress)}
backTitle={props.backTitle}
/>
);

export const BackButtonIos = props => (
export const BackButton = props => (
<BaseBackButton
onPress={
props.onPress ? props.onPress : Actions.pop
}
backTitle={props.backTitle}
/>
/>
);

export const BackButton = props => Platform.select({
ios: () => <BackButtonIos {...props} />,
android: () => <BackButtonAndroid {...props} />,
})();
1 change: 1 addition & 0 deletions js/containers/Detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import DetailComponent from '../components/DetailComponent';

//Container for detail
const Detail = (props) => {
console.log(props.item);
return (
<View>
<DetailComponent
Expand Down

0 comments on commit 417012e

Please sign in to comment.