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

[FR] Switch to AppCompatActivity #5785

Closed
farfromrefug opened this Issue May 5, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@farfromrefug
Contributor

farfromrefug commented May 5, 2018

Hi,

I was trying to implement shared elements animations using this tuto:
https://android-developers.googleblog.com/2018/02/continuous-shared-element-transitions.html

To do that we need to use AppCompatActivity, compat Fragment ....
For that the whole Nativescript framework needs to switch to support v4 classes (frame, activity, fragment, fragment.transition).
I started to work on that but it's not easy because the FragmentManager does not have a loadAnimator but a loadAnimation. Which means it does not use animators but animations.

Also this will be a requirement as the android.app.FragmentManager is deprecated in P
:https://developer.android.com/reference/android/app/FragmentManager

If you are ok with that i can make a PR.

@farfromrefug farfromrefug changed the title from Switch to AppCompatActivity to [FR] Switch to AppCompatActivity May 5, 2018

@farfromrefug

This comment has been minimized.

Show comment
Hide comment
@farfromrefug

farfromrefug May 5, 2018

Contributor

I have been looking deeper at this and started working on that.
The only real issue is that the support fragmentmanager uses animations and not animators whic makes the current code not compatible.
I al still tryingb to figure out why we need have those defaults animator which are cloned for every fragment.

Contributor

farfromrefug commented May 5, 2018

I have been looking deeper at this and started working on that.
The only real issue is that the support fragmentmanager uses animations and not animators whic makes the current code not compatible.
I al still tryingb to figure out why we need have those defaults animator which are cloned for every fragment.

@farfromrefug

This comment has been minimized.

Show comment
Hide comment
@farfromrefug

farfromrefug May 6, 2018

Contributor

I actually got it working. And shared elements got working with it too.
may-06-2018 18-05-18
I created a PR #5789

Contributor

farfromrefug commented May 6, 2018

I actually got it working. And shared elements got working with it too.
may-06-2018 18-05-18
I created a PR #5789

@tsonevn tsonevn added the feature label May 7, 2018

@wafflebot wafflebot bot added the in progress label Jul 27, 2018

manoldonev added a commit that referenced this issue Aug 2, 2018

fix(android): suppress reflection for default animations (#6141)
Fixes `Error: java.lang.CloneNotSupportedException: Class android.support.v4.app.FragmentManagerImpl$AnimationOrAnimator doesn't implement Cloneable` in specific projects.

Related to #5785
Related to #6129 

BREAKING CHANGE


Before:
Default fragment enter animation was Android version specific

After:
Default fragment enter animation is now fade animation for all Android versions

You can customise the transition per navigation entry or globally via the [navigation transitions API](
https://docs.nativescript.org/core-concepts/navigation#navigation-transitions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment