Setting up the animated property to true on showModal method will not apply the animation for the modal page in Android. This scenario can be reproduced on the below-attached sample project.
Archive.zip
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
@tsonevn When will this issue be solved? It's core function and it does not work properly.
And also it will be nice if it would be possible to choose from which side Modal Page should appear (not only from bottom).
I am also waiting on this core functionality.
Hi all,
This issue is still under review. I can not commit to the exact time when the fix will be available.
Also, any PR, which provides a fix for this problem will be highly appreciated. You can check our contribution guidelines.
It's been a while. Is there any movement here?
I just implemented modals in our application. It's working great with iOS, but I've essentially had to fork the navigation between iOS and Android in order to maintain navigation animations on Android. This is an ugly solution though. Can we please bump this up the priority list?
Any update on this?
It's working when fullscreen
is set to false
.
https://github.com/NativeScript/NativeScript/issues/6232#issuecomment-521324327
@NickIliev see my comment there and if you all think that's sufficient for a PR to fix the animation not working on android when set.
code fix:
// set the animations to use on showing and hiding the dialog
window_1.setWindowAnimations(android.R.style.Animation_Dialog);
Below is how it looks in the project I'm working on.
This is how Google Fit looks when presenting a modal/activity with the transition they use:
I know the docs say this animation suits non-full screen dialogs but it actually looks and performs really well on Android Q on my Pixel2 (https://developer.android.com/reference/android/R.style#Animation_Dialog)
I haven't tested what Android O, N, M, L look like with this option but I'm going to use it in a project bc it looks identical to Google Fit on android when it opens modals/activities
@bradmartin the solution seems to work properly on first glance. Please post a PR so we could test extensively.
Don't see any changes. My fullscreen
and animated
modals still not animated.
Seems to be working with the @next
core-modules in my app. Maybe you haven't updated 馃
@bradmartin I've updated to 6.0.7 and see your commit there
possibly could be an android OS version scenario that needs different handling. I've only tested this on Android P and Android10 beta. It worked on both, the .gif I posted is how it works on what I've tested.
@bradmartin now it works (after several clean builds).
Now would be great to have ability to customize this transition.
Most helpful comment
I just implemented modals in our application. It's working great with iOS, but I've essentially had to fork the navigation between iOS and Android in order to maintain navigation animations on Android. This is an ugly solution though. Can we please bump this up the priority list?