Skip to content

Unnecessarily complexity in RecyclerView sample #3

@keyboardsurfer

Description

@keyboardsurfer

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions