title: Shared RelativeLayout transitions between two fragments
body: <p>I am trying to make a Fragment Relative_layout animation between two fragments. but the whole fragment is animating.please help me
  here is my code.</p>
  
  <p>from fragment 'A' i am calling this, relative_layout is a "RelativeLayout"</p>
  
  <pre><code>            // Check that the device is running lollipop
              if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.LOLLIPOP) {
                  setSharedElementReturnTransition(TransitionInflater.from(getActivity()).inflateTransition(R.transition.change_image_transform));
                  setExitTransition(TransitionInflater.from(getActivity()).inflateTransition(android.R.transition.explode));
  
                  // Create new fragment to add (Fragment B)
                  EmailLogInPage emailLogInPage = new EmailLogInPage();
                  emailLogInPage.setSharedElementEnterTransition(TransitionInflater.from(getActivity()).inflateTransition(R.transition.change_image_transform));
                  emailLogInPage.setEnterTransition(TransitionInflater.from(getActivity()).inflateTransition(android.R.transition.explode));
  
  
  
                  // Add Fragment B
                  fragmentTransaction = getFragmentManager().beginTransaction()
                          .replace(R.id.container, emailLogInPage)
                          .addToBackStack("transaction")
                          .addSharedElement(relative_layout, "profile");
                  fragmentTransaction.commit();
              }
  </code></pre>
  
  <p>this is my layout </p>
  
  <pre><code>        &lt;RelativeLayout
          android:layout_width="match_parent"
          android:layout_marginLeft="20dp"
          android:layout_marginRight="20dp"
          android:layout_marginTop="20dp"
          android:transitionName="profile"
          android:layout_weight="1"
  
          android:id="@+id/login_with_mail"
          android:background="@drawable/rounded_corner_without_color"
          android:layout_height="40dp"&gt;
  
          &lt;RelativeLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@drawable/rounded_corner"
              android:alpha="0.3"
              &gt;
  
          &lt;/RelativeLayout&gt;
          &lt;RelativeLayout
              android:layout_width="40dp"
              android:layout_height="match_parent"
              android:background="@drawable/rounded_corner_box_round"
              android:alpha="0.05"&gt;
  
          &lt;/RelativeLayout&gt;
          &lt;ImageView
              android:layout_width="20dp"
              android:layout_marginLeft="10dp"
              android:layout_height="match_parent"
              android:scaleType="centerInside"
              android:src="@drawable/mailp"
              /&gt;
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_centerInParent="true"
              android:textColor="#fff"
              android:text="Login with Mail"/&gt;
      &lt;/RelativeLayout&gt;
  </code></pre>