Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.24 NavBar BackButton bug fix and add react-native-vector-icons support #564

Closed
wants to merge 32 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3561582
direction support for rn 0.24+
joenoon Apr 11, 2016
1256e03
fix || logic and optimize duration 0
joenoon Apr 11, 2016
914ae8b
Improve README
Kerumen Apr 17, 2016
ea8aad1
Merge pull request #1 from aksonov/master
cridenour Apr 17, 2016
aa74423
Bump example project dependency.
cridenour Apr 17, 2016
a3a6087
Merge branch 'jn-direction1' of github.com:joenoon/react-native-route…
cridenour Apr 17, 2016
1f2c98c
Cleanup styles and unused imports.
cridenour Apr 17, 2016
495c794
Remove optionals.
cridenour Apr 17, 2016
546c00c
Make sure panHandler can be passed as null.
cridenour Apr 17, 2016
6aac7bd
Actually run react-native upgrade.
cridenour Apr 17, 2016
ff69aaa
Document why we removed optionals.
cridenour Apr 17, 2016
d0ff592
Merge pull request #536 from cridenour/feature/react-native-24
aksonov Apr 18, 2016
55bb2d2
Revert "[WIP] Get Example app working with React 0.24+ "
aksonov Apr 18, 2016
f44d50c
Merge pull request #538 from aksonov/revert-536-feature/react-native-24
aksonov Apr 18, 2016
915d3a3
Revert "Revert "[WIP] Get Example app working with React 0.24+ ""
aksonov Apr 18, 2016
c4ea2f8
Merge pull request #539 from aksonov/revert-538-revert-536-feature/re…
aksonov Apr 18, 2016
5d12464
update redux instructions in README
lynndylanhurley Apr 18, 2016
61967e6
fix typo in readme
lynndylanhurley Apr 18, 2016
3be4fc6
Merge pull request #542 from lynndylanhurley/master
aksonov Apr 18, 2016
71f58a1
improve redux setup README
lynndylanhurley Apr 18, 2016
a8e383a
Merge pull request #543 from lynndylanhurley/master
aksonov Apr 18, 2016
a74ef41
Merge pull request #535 from Kerumen/patch-1
aksonov Apr 18, 2016
59821c3
publish new version
Apr 18, 2016
48b42b1
Including the selected child lets the renderRight and Left buttons
jondot Apr 18, 2016
12f18a5
add render title callback
timzaak Apr 19, 2016
e278588
fix the comment
timzaak Apr 19, 2016
7e6d0ee
Merge pull request #547 from timzaak/renderTitle
aksonov Apr 19, 2016
6d3e1e1
add selected to renderBackButton as well
jondot Apr 19, 2016
14e232e
Merge pull request #545 from jondot/master
aksonov Apr 19, 2016
fe5da32
hideNavBar hide scene only for current scene
philipshurpik Apr 22, 2016
33dd760
bump package.json version
philipshurpik Apr 22, 2016
4473881
Merge pull request #572 from philipshurpik/3.24-hideNavBar
aksonov Apr 22, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup styles and unused imports.
cridenour committed Apr 17, 2016
commit 1f2c98cfa097a623d74cc7592538bef5753edfc4
36 changes: 17 additions & 19 deletions src/DefaultRenderer.js
Original file line number Diff line number Diff line change
@@ -9,15 +9,13 @@
import React, {Component, Animated, PropTypes, StyleSheet, View, NavigationExperimental} from "react-native";
const {
AnimatedView: NavigationAnimatedView,
Card: NavigationCard,
RootContainer: NavigationRootContainer,
Header: NavigationHeader,
} = NavigationExperimental;
Card: NavigationCard
} = NavigationExperimental;

const {
CardStackPanResponder: NavigationCardStackPanResponder,
CardStackStyleInterpolator: NavigationCardStackStyleInterpolator
} = NavigationCard;
} = NavigationCard;

import TabBar from "./TabBar";
import NavBar from "./NavBar";
@@ -46,13 +44,13 @@ export default class DefaultRenderer extends Component {
return null;
}
let Component = navigationState.component;
if (navigationState.tabs && !Component){
if (navigationState.tabs && !Component) {
Component = TabBar;
}
if (Component) {
return (
<View style={[{flex: 1}, navigationState.sceneStyle]}>
<Component {...navigationState} navigationState={navigationState} />
<Component {...navigationState} navigationState={navigationState}/>
</View>
)
}
@@ -93,30 +91,30 @@ export default class DefaultRenderer extends Component {

_renderHeader(/*NavigationSceneRendererProps*/ props) {
return <NavBar
{...props}
getTitle={state => state.title}
/>;
{...props}
getTitle={state => state.title}
/>;
}

_renderCard(/*NavigationSceneRendererProps*/ props) {
const { key, direction, getSceneStyle } = props.scene.navigationState;
let { panHandlers, animationStyle } = props.scene.navigationState;
const {key, direction, getSceneStyle} = props.scene.navigationState;
let {panHandlers, animationStyle} = props.scene.navigationState;

let style = {};
if (getSceneStyle) style = getSceneStyle(props);

const isVertical = direction === "vertical";

if (!animationStyle) {
animationStyle = (isVertical ?
NavigationCardStackStyleInterpolator.forVertical(props) :
NavigationCardStackStyleInterpolator.forHorizontal(props));
animationStyle = (isVertical ?
NavigationCardStackStyleInterpolator.forVertical(props) :
NavigationCardStackStyleInterpolator.forHorizontal(props));
}

if (!panHandlers) {
panHandlers = panHandlers || (isVertical ?
NavigationCardStackPanResponder.forVertical(props) :
NavigationCardStackPanResponder.forHorizontal(props));
panHandlers = panHandlers || (isVertical ?
NavigationCardStackPanResponder.forVertical(props) :
NavigationCardStackPanResponder.forHorizontal(props));
}

return (
@@ -140,6 +138,6 @@ export default class DefaultRenderer extends Component {
const styles = StyleSheet.create({
animatedView: {
flex: 1,
backgroundColor:"transparent"
backgroundColor: "transparent"
},
});