title: Shared Element Transition Android Doesn't Work
body: <p>I'm trying to to this for a day but i don't know what is the problem! I have an activity with two fragments which in the first one i have a RecyclerView contains an imageview and on the other fragment i have another imageview.</p>
  
  <p>custom view layer imageview:</p>
  
  <pre><code>&lt;ImageView
      android:id="@+id/clst_img_cover"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:scaleType="centerCrop"
      app:srcCompat="@drawable/no_image"
      android:transitionName="@string/transition_name_cover"/&gt;
  </code></pre>
  
  <p>fragment two imageview:</p>
  
  <pre><code>&lt;ImageView
          android:id="@+id/img_movie_cover"
          android:transitionName="@string/transition_name_cover"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:scaleType="centerCrop"
          android:src="@color/colorWhite" /&gt;
  </code></pre>
  
  <p>and in my adapter for the list view:</p>
  
  <pre><code>MovieDetailsFragment movieDetails = new 
  MovieDetailsFragment().newInstance(String.valueOf(model.getId()));
  FragmentManager manager = ((MainActivity)v.getContext()).getFragmentManager();
  FragmentTransaction transaction = manager.beginTransaction();
  if (android.os.Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) {
      String a = v.getContext().getResources().getString(R.string.transition_name_cover);
      cover.setTransitionName(a);
      movieDetails = new MovieDetailsFragment().newInstance(String.valueOf(model.getId()),((BitmapDrawable)cover.getDrawable()).getBitmap());
      Transition changeTransform = TransitionInflater.from(context).inflateTransition(R.transition.default_transition);
      changeTransform.setDuration(1500);
      MovieList current = (MovieList) manager.findFragmentById(R.id.activity_main_container_body);
      movieDetails.setSharedElementReturnTransition(new CustomTransition());
      movieDetails.setSharedElementEnterTransition(new CustomTransition());
      movieDetails.setEnterTransition(new Fade());
      current.setExitTransition(new Fade());
      String x = cover.getTransitionName();
      transaction.addSharedElement(cover,a);
  }
  else{
      transaction.setCustomAnimations(R.animator.fr_fade_in,R.animator.fr_slide_out_right,R.animator.fr_slide_in_right,R.animator.fr_fade_out);
  }
  transaction.replace(R.id.activity_main_container_body,movieDetails,"movieDetails");
  transaction.addToBackStack(null);
  transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
  transaction.commit();
  </code></pre>
  
  <p>and my second fragment has two newInstance method like this:</p>
  
  <pre><code>public static MovieDetailsFragment newInstance(String Movie_ID) {
      MovieDetailsFragment fragment = new MovieDetailsFragment();
      Bundle args = new Bundle();
      args.putString(ARG_PARAM1, Movie_ID);
      fragment.setArguments(args);
      return fragment;
  }
  
  public static MovieDetailsFragment newInstance(String Movie_ID,Bitmap bmp) {
      MovieDetailsFragment fragment = new MovieDetailsFragment();
      Bundle args = new Bundle();
      args.putString(ARG_PARAM1, Movie_ID);
      args.putParcelable(ARG_PARAM2, bmp);
      fragment.setArguments(args);
      return fragment;
  }
  </code></pre>
  
  <p>and this is CustomTransition.java :</p>
  
  <pre><code>@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
  public class CustomTransition extends TransitionSet {
      public  CustomTransition(){
          setOrdering(ORDERING_TOGETHER);
          addTransition(new ChangeBounds()).addTransition(new ChangeTransform()).addTransition(new ChangeImageTransform());
      }
  }
  </code></pre>
  
  <p>it acts for the fade but doesn't work for the image!</p>
  
  <p><strong>Update</strong>
  I suggest to use <a href="https://github.com/ebrahimkarimi/CircularImageViewTransition" rel="nofollow noreferrer">this example</a> in my git repository, its a great example for beginners.</p>