Skip to content

Commit

Permalink
Back out of D3000972
Browse files Browse the repository at this point in the history
Reviewed By: dmmiller

Differential Revision: D3003211

fb-gh-sync-id: e64f1f17dcbf19a32066de91d6e839d59cd5d27c
shipit-source-id: e64f1f17dcbf19a32066de91d6e839d59cd5d27c
  • Loading branch information
bestander authored and Facebook Github Bot 9 committed Mar 3, 2016
1 parent 36f1961 commit 5ffeb97
Show file tree
Hide file tree
Showing 22 changed files with 117 additions and 373 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ var {
RootContainer: NavigationRootContainer,
Reducer: NavigationReducer,
Header: NavigationHeader,
HeaderTitle: NavigationHeaderTitle,
} = NavigationExperimental;

const NavigationBasicReducer = NavigationReducer.StackReducer({
Expand Down Expand Up @@ -61,6 +60,12 @@ class NavigationAnimatedExample extends React.Component {
/>
);
}
handleBackAction() {
return (
this.navRootContainer &&
this.navRootContainer.handleNavigation(NavigationRootContainer.getBackAction())
);
}
_renderNavigated(navigationState, onNavigate) {
if (!navigationState) {
return null;
Expand All @@ -69,13 +74,11 @@ class NavigationAnimatedExample extends React.Component {
<NavigationAnimatedView
navigationState={navigationState}
style={styles.animatedView}
renderOverlay={(scenes, index, position, layout) => (
renderOverlay={(props) => (
<NavigationHeader
scenes={scenes}
index={index}
position={position}
layout={layout}
renderTitleComponent={pageState => <NavigationHeaderTitle>{pageState.key}</NavigationHeaderTitle>}
navigationState={props.navigationParentState}
position={props.position}
getTitle={state => state.key}
/>
)}
setTiming={(pos, navState) => {
Expand Down Expand Up @@ -118,7 +121,7 @@ const styles = StyleSheet.create({
flex: 1,
},
scrollView: {
marginTop: NavigationHeader.APPBAR_HEIGHT + NavigationHeader.STATUSBAR_HEIGHT,
marginTop: 64
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const NavigationExampleRow = require('./NavigationExampleRow');
const {
RootContainer: NavigationRootContainer,
Reducer: NavigationReducer,
Header: NavigationHeader,
} = NavigationExperimental;
const StackReducer = NavigationReducer.StackReducer;

Expand Down Expand Up @@ -94,7 +93,7 @@ const styles = StyleSheet.create({
topView: {
backgroundColor: '#E9E9EF',
flex: 1,
paddingTop: NavigationHeader.STATUSBAR_HEIGHT,
paddingTop: 30,
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const {
Container: NavigationContainer,
RootContainer: NavigationRootContainer,
Header: NavigationHeader,
HeaderTitle: NavigationHeaderTitle,
Reducer: NavigationReducer,
View: NavigationView,
} = NavigationExperimental;
Expand Down Expand Up @@ -155,15 +154,13 @@ class ExampleTabScreen extends React.Component {
/>
);
}

_renderHeader(scenes, index, position, layout) {
_renderHeader(props) {
return (
<NavigationHeader
scenes={scenes}
index={index}
position={position}
layout={layout}
renderTitleComponent={pageState => <NavigationHeaderTitle>{stateTypeTitleMap(pageState)}</NavigationHeaderTitle>}
navigationState={props.navigationParentState}
position={props.position}
layout={props.layout}
getTitle={state => stateTypeTitleMap(state)}
/>
);
}
Expand Down Expand Up @@ -273,7 +270,7 @@ const styles = StyleSheet.create({
flex: 1,
},
scrollView: {
marginTop: NavigationHeader.APPBAR_HEIGHT + NavigationHeader.STATUSBAR_HEIGHT,
marginTop: 64
},
tabContent: {
flex: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
var React = require('react-native');
var {
Text,
PixelRatio,
StyleSheet,
View,
TouchableHighlight,
Expand Down Expand Up @@ -49,7 +50,7 @@ const styles = StyleSheet.create({
row: {
padding: 15,
backgroundColor: 'white',
borderBottomWidth: StyleSheet.hairlineWidth,
borderBottomWidth: 1 / PixelRatio.get(),
borderBottomColor: '#CDCDCD',
},
rowText: {
Expand Down
2 changes: 0 additions & 2 deletions Examples/UIExplorer/UIExplorerList.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
'use strict';

const React = require('react');

export type UIExplorerExample = {
key: string;
module: React.Component;
Expand Down
Loading

0 comments on commit 5ffeb97

Please sign in to comment.