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

Unnecessarily complexity in RecyclerView sample #3

keyboardsurfer opened this issue Feb 27, 2017 · 1 comment

Unnecessarily complexity in RecyclerView sample #3

keyboardsurfer opened this issue Feb 27, 2017 · 1 comment


Copy link

keyboardsurfer commented Feb 27, 2017

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.

Copy link

mikescamell commented Mar 5, 2017

I've adjusted the code to take into account 1, 2 and 3. 4 will take me some more time and I intend to get it done next weekend.

@mikescamell mikescamell mentioned this issue Mar 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants