mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 03:50:11 +08:00
Back out of D3000972
Reviewed By: dmmiller Differential Revision: D3003211 fb-gh-sync-id: e64f1f17dcbf19a32066de91d6e839d59cd5d27c shipit-source-id: e64f1f17dcbf19a32066de91d6e839d59cd5d27c
This commit is contained in:
committed by
Facebook Github Bot 9
parent
36f1961003
commit
5ffeb9764c
@@ -27,7 +27,6 @@ var {
|
||||
RootContainer: NavigationRootContainer,
|
||||
Reducer: NavigationReducer,
|
||||
Header: NavigationHeader,
|
||||
HeaderTitle: NavigationHeaderTitle,
|
||||
} = NavigationExperimental;
|
||||
|
||||
const NavigationBasicReducer = NavigationReducer.StackReducer({
|
||||
@@ -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;
|
||||
@@ -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) => {
|
||||
@@ -118,7 +121,7 @@ const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
scrollView: {
|
||||
marginTop: NavigationHeader.APPBAR_HEIGHT + NavigationHeader.STATUSBAR_HEIGHT,
|
||||
marginTop: 64
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ const NavigationExampleRow = require('./NavigationExampleRow');
|
||||
const {
|
||||
RootContainer: NavigationRootContainer,
|
||||
Reducer: NavigationReducer,
|
||||
Header: NavigationHeader,
|
||||
} = NavigationExperimental;
|
||||
const StackReducer = NavigationReducer.StackReducer;
|
||||
|
||||
@@ -94,7 +93,7 @@ const styles = StyleSheet.create({
|
||||
topView: {
|
||||
backgroundColor: '#E9E9EF',
|
||||
flex: 1,
|
||||
paddingTop: NavigationHeader.STATUSBAR_HEIGHT,
|
||||
paddingTop: 30,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ const {
|
||||
Container: NavigationContainer,
|
||||
RootContainer: NavigationRootContainer,
|
||||
Header: NavigationHeader,
|
||||
HeaderTitle: NavigationHeaderTitle,
|
||||
Reducer: NavigationReducer,
|
||||
View: NavigationView,
|
||||
} = NavigationExperimental;
|
||||
@@ -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)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -273,7 +270,7 @@ const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
},
|
||||
scrollView: {
|
||||
marginTop: NavigationHeader.APPBAR_HEIGHT + NavigationHeader.STATUSBAR_HEIGHT,
|
||||
marginTop: 64
|
||||
},
|
||||
tabContent: {
|
||||
flex: 1,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
var React = require('react-native');
|
||||
var {
|
||||
Text,
|
||||
PixelRatio,
|
||||
StyleSheet,
|
||||
View,
|
||||
TouchableHighlight,
|
||||
@@ -49,7 +50,7 @@ const styles = StyleSheet.create({
|
||||
row: {
|
||||
padding: 15,
|
||||
backgroundColor: 'white',
|
||||
borderBottomWidth: StyleSheet.hairlineWidth,
|
||||
borderBottomWidth: 1 / PixelRatio.get(),
|
||||
borderBottomColor: '#CDCDCD',
|
||||
},
|
||||
rowText: {
|
||||
|
||||
Reference in New Issue
Block a user