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

Mutiple Views? #14

Closed
tom-anders opened this issue Oct 15, 2015 · 7 comments
Closed

Mutiple Views? #14

tom-anders opened this issue Oct 15, 2015 · 7 comments

Comments

@tom-anders
Copy link

I'm trying to animate an ImageView and a TextView.

My code:

ActivityTransitionLauncher.with(SearchResultsActivity.this).from(v.findViewById(R.id.comic_title)).from(v.findViewById(R.id.thumbnail)).image(bitmap).launch(intent);

ActivityTransition.with(getActivity().getIntent()).duration(1000).to(tvTitle).to(pvComic).start(null);

For some reason only the ImageView is animated, the TextView is not.

@takahirom
Copy link
Owner

Thank you for feedback!
It is not possible currently.
I will try it!

@tom-anders
Copy link
Author

Nice!

@takahirom
Copy link
Owner

@shiraji
Thanks for participating in the discussion!
I am planning the following interface .

ActivityTransitionLauncher.with(SearchResultsActivity.this).from(v.findViewById(R.id.comic_title),"title").from(v.findViewById(R.id.thumbnail),"image").image(bitmap).launch(intent);
ActivityTransition.with(getActivity().getIntent()).duration(1000).to(tvTitle,"title").to(pvComic,"image").start(null);

This it is the original method.
[ActivityOptions#makeSceneTransitionAnimation](http://developer.android.com/intl/ja/reference/android/app/ActivityOptions.html#makeSceneTransitionAnimation%28android.app.Activity, android.view.View, java.lang.String%29)

Do you have better interface idea?

By the way, If you are interested, Please fix this or tell me solution.
Now this library use file transfer in MainThread :(
#3
https://github.com/takahirom/PreLollipopTransition/blob/master/pre-lollipop-activity-transition/src/main/java/com/kogitune/activity_transition/core/TransitionBundleFactory.java#L37

@shiraji
Copy link
Collaborator

shiraji commented Nov 2, 2015

You're welcome.

It's hard to see long code in one line in GitHub. I rewrote what you show me.

// what you want to do...i guess
ActivityTransitionLauncher
    .with(SearchResultsActivity.this)
    .from(v.findViewById(R.id.comic_title),"title")
    .from(v.findViewById(R.id.thumbnail),"image")
    .image(bitmap)
    .launch(intent);
// what current project does
ActivityTransition
    .with(getActivity().getIntent())
    .duration(1000)
    .to(tvTitle,"title")
    .to(pvComic,"image")
    .start(null);

First of all, I haven't have any chance writing code for this library. Could you give me a few days to read this library? As my first inspiration, I think your interface is good to go.

Definitely, I want to do this or #3 or both of them, but you can free to complete these issues. (not even read what issue is for #3, yet 😱 )

@takahirom
Copy link
Owner

Sure :)
I will create a WIP Pull-Request when I have time to complete these issues.
But, I will attend this event. So I'm so busy..
http://shibuya-apk.connpass.com/event/21474/

@shiraji
Copy link
Collaborator

shiraji commented Nov 2, 2015

Nice one. Shibuya event at Roppongi! Enjoy. I don't think we should be so hurry for these issue, since it is enhancement of the library.

@takahirom
Copy link
Owner

Multiple views animation is not good on design guideline.
So I close this issue.

https://material.google.com/motion/material-motion.html#material-motion-what-makes-a-good-transition

Transitions can get confusing when multiple items need to move in different directions or cross paths.

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

3 participants