Giter Site home page Giter Site logo

mikescamell / shared-element-transitions Goto Github PK

View Code? Open in Web Editor NEW
284.0 284.0 73.0 374 KB

Source code for a blog post series on Shared Element Transitions in Android

Home Page: http://bit.ly/sharedelementtransitions

License: MIT License

Java 100.00%

shared-element-transitions's People

Contributors

fdorssers avatar jonathan-caryl avatar mikescamell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shared-element-transitions's Issues

Method Missing

I had just downloaded the code and try to run getting this method missing
postponeEnterTransition();
This method is missing please help

postponeEnterTransition() does not work in "Picasso Fragment to Fragment" sample.

Calling of a method postponeEnterTransition() has no effect. To check it remove startPostponedEnterTransition() calls in a Picasso callback. A transition will be still plays, but it should not. Documentation says: "Likewise, postponement only works if FragmentTransaction optimizations are enabled." So, to fix the sample call setAllowOptimization(true) of a FragmentTransaction.

resize when back

please see the picture with starfish example
image

when I press back button the animation get back but a rare size shrink occurs. (in the second back press in gif you will see clearly)

Do you have any ideas of what is going on?

Thanks

Unnecessarily complexity in RecyclerView sample

I noticed several inaccuracies within your RecyclerView blog post which are reflected in this sample's code.

  1. AnimalDetailActivity TransitionName
    Transition names on the views don't have to be the same on both ends of the transition. They have to be unique for their own view hierarchy though and be matched within makeSceneTransitionAnimation. See this for an example.
  2. In RecyclerViewActivity: The ActivityOptionsCompat call can be simplified by applying the suggestion of 1.
  3. The AnimalItemClickListener's parameter transitionName can be removed when following through with the suggestions so far.
  4. You're removing the transition in the ViewPagerFragment on the way back to the RecyclerView.
    There is a better way: When using onActivityReenter you can postpone a transition and remap views.

These suggestions can also be applied within the recycler_view_to_fragment example.

Source: I wrote this.

Fragment to Activity Transiction

I want to transit fragment to activity. I am using this

Intent intent = new Intent(getActivity(), SingleImage.class);
    intent.putExtra("item", songItem.getUrlC());
    intent.putExtra("view", ViewCompat.getTransitionName(imageView));

    ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(
            getActivity(),
            imageView,
            ViewCompat.getTransitionName(imageView));

    startActivity(intent, options.toBundle());

I can see a error in log cat

   java.lang.IllegalArgumentException: Shared element name must not be null

How i can solve it?? or can you give me any way??

Return transition doesn't work

I have nested fragments inside a fragment and it works perfect when I enter the second fragment. But when I pop back stack to return to the first fragment it just normally returns without any animation or move or anything, like no shared elements ever defined. Also I'm using cardview for my recycler items layout.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.