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

iOS card animations for android #1400

Closed
j-mendez opened this issue May 5, 2017 · 8 comments
Closed

iOS card animations for android #1400

j-mendez opened this issue May 5, 2017 · 8 comments

Comments

@j-mendez
Copy link

j-mendez commented May 5, 2017

It would be nice to have this working the same for android since mode={'modal'} and mode={'card'} are the same transitions on android.

@koenpunt
Copy link

koenpunt commented May 7, 2017

Ran into this as well, and as a workaround I set the transitionConfig to the horizontal interpolator:

import CardStackStyleInterpolator from 'react-navigation/src/views/CardStackStyleInterpolator';

export default StackNavigator({
  Home: {
    screen: HomeScreen,
  },
}, {
  transitionConfig: () => ({
    screenInterpolator: CardStackStyleInterpolator.forHorizontal,
  }),
  navigationOptions: ({ navigation }) => ({
    //...
  }),
})

@wokalski
Copy link

It would be great to export CardStackStyleInterpolator to the public API. It has been also mentioned in #1002 by @ericvicenti.

@ryancoughlin
Copy link

Trying to track down a bit more information regarding custom transitions and transitionConfig within this lib. What exactly will:

  transitionConfig: () => ({
    screenInterpolator: CardStackStyleInterpolator.forHorizontal,
  }),

When executed?

@manuTro
Copy link

manuTro commented Jun 29, 2017

@wokalski Do you know if now CardStackStyleInterpolator is available into the API? I got problem by requiring it from "react-navigation/src/views/CardStackStyleInterpolator.js"

@koenpunt
Copy link

koenpunt commented Jun 29, 2017

@manuTro the following works fine for me:

import CardStackStyleInterpolator from 'react-navigation/src/views/CardStackStyleInterpolator';

@manuTro
Copy link

manuTro commented Jun 29, 2017

@koenpunt The problem is that I'm using clojurescript so I need to require it directly from react-navigation.. Otherwise it works but I have this warnig:
warning

@manuTro
Copy link

manuTro commented Jun 29, 2017

@koenpunt Or maybe is there another way to make stacknavigator swipe horizontally?

@koenpunt
Copy link

You can copy the file for the time being, until it's exposed as a default export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants