-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Animations for transition on Android #2628
Comments
@Blapi Please check custom 'Modal' animation from Example with usage |
Will check this very soon, thanks for your reply ! |
Also PR about passing this custom interpolators for 'horizontal' (v3 syntax) prop could be helpful. |
BTW, is it possible at the moment to push the new screen to stack navigator w/o any animated transition, like |
So far, I managed to change the navigation transition using this :
But I'm still unable to give a specific transitionConfig for each scenes that I have, the transitionConfig is the same for all the scenes that I have, still working to figure out how I can have a specific transitionConfig for a scene. Anyway, you can at least have a different transitionConfig on your app with giving this prop to the root Scene/Stack/whateverYouHave |
@todorone, on your root Scene/Stack, add Note that it will be applied for all your scenes, I haven't managed to have a specific animated transition for a specific scene |
@Blapi |
Looks like it is limitation if react navigation library, so please request it there.
… 7 дек. 2017 г., в 11:04, Todor1 ***@***.***> написал(а):
@Blapi
Thanks for the hint, I've also figured out it. I've also figured out that adding duration={0} as prop, we also disabling transition. But figure out how to control specific transition is really needed...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ok cool, I checked the issues on the react-navigation library and found this solution :
(groups, inbox and home are some keys of the scenes I have) So it's working on my Android app, but there's just a minor thing because the transitions may overlap each other, it's just a logic thing to do I guess and can be solved easily. You can also implement your own CardStackStyleInterpolator as @aksonov said before, just check the code there https://github.com/react-community/react-navigation/blob/master/src/views/CardStack/CardStackStyleInterpolator.js to see how to create your own transition. My code logic may not be the best one using a switch, I will certainly change it but it was just an example, so do as you wish ! I guess if you check the props of the screenInterpolator, you can find enough informations to build your own logic ! And be careful, the main |
@Blapi Great, could you submit PR to docs about it? Also it could be good to generate own transitionConfig automatically by our component (if it is not defined for the root) and return custom animations defined by individual Scene like that |
@aksonov sure but I won't have time this week, will do that next week |
@aksonov, running late for this PR but will do for sure when I have time. |
Hey @Blapi, any updates on this? :) |
@MasterDaveh I was working a lot on my app recently as I had to publish it today. Now I will have more time so I will definitely take care of it soon. |
To anyone who stumbles on to this thread - to get the old direction= behaviour back you can just add the following to your root scene... :)
|
Path has been changed now. Use |
You an use your custom transition effects like as follow:
|
This works well! :) Thanks |
Does not work for tabs. Is there any other solution? |
@michaelfemi81 Did you find any way to implement in tabs? |
Version
Tell us which versions you are using:
I read some of the issues on the v4 with Android animations and I'm aware that the behaviour should be bottomToTop #2177 , which I see on many other apps.
I'd like to know if something is planned to integrate the previous work on the v3 with the direction horizontal/rightToLeft/vertical/topToBottom because it was very helpful and appreciated.
On this issue : #2502 , it's said
I installed the Example app on my Android device but all the animations are bottomToTop and I found no example of custom animation which would be helpful, any help on this please? Either if you know that the directions are planned to be done on Android or if there is a way to create a custom animation with an example ?
The text was updated successfully, but these errors were encountered: