Hi i am developing an app where i'm using shared element transition to animate enter and exit transitions on login and register activity animating one imageview and two textviews but my problem is that views are not animated at all instead when i click on register button the register activity blinks twice and no animation occurs and moreover the image in register activity losses its shape so i dont know where i'm going wrong becaues i have given same transition names in both the activites still the problem exists so i would appreciate some help. Here is my styles.xml
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:splitMotionEvents">false</item>
<!-- Transition -->
<item name="android:windowContentTransitions" tools:targetApi="21">true</item>
<item name="android:windowEnterTransition" tools:targetApi="21">@android:transition/fade
</item>
<item name="android:windowExitTransition" tools:targetApi="21">@android:transition/fade
</item>
<item name="android:windowActivityTransitions">true</item>
<item name="android:windowSharedElementEnterTransition" tools:targetApi="21">
@android:transition/move
</item>
<item name="android:windowSharedElementExitTransition" tools:targetApi="21">
@android:transition/move
</item>
</style>
</resources>
my login activity
public void gotoregister(View view) {
Intent intent = new Intent(LoginActivity.this,RegisterActivity.class);
Pair[] pairs = new Pair[3];
pairs[0] = new Pair<View,String>(text_login,getResources().getString(R.string.login_text_transition));
pairs[1] = new Pair<View,String>(login_page_curve,getResources().getString(R.string.transition_name_signup));
pairs[2] = new Pair<View,String>(register_text,getResources().getString(R.string.register_text_transition));
ActivityOptionsCompat optionsCompat = ActivityOptionsCompat.makeSceneTransitionAnimation
(LoginActivity.this,pairs);
startActivity(intent,optionsCompat.toBundle());
finish();
//overridePendingTransition(R.anim.bottom_up,R.anim.bottom_down);
}