I am relatively new to animations in android, I tried to add transaction animations to fragments, they look and feel good. I made slide in and out animations. The problem is you can click the buttons while animation is in progress. How can I make sure user can't click new screens buttons until animation is done? Thanks.
fragmentTransaction.setCustomAnimations(R.anim.enter_from_right,R.anim.exit_to_left);
fragmentTransaction.replace(R.id.frame_container, new LoginFragment());
enter_from_right.xml:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:fromXDelta="100%" android:toXDelta="0%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="700" />
</set>
exit_to_left.xml:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:fromXDelta="0%" android:toXDelta="-100%"
android:fromYDelta="0%" android:toYDelta="0%"
android:duration="700"/>
</set>