Commit e9d31c07 authored by Varun Patil's avatar Varun Patil

Change all animations to fade/slide

parent aa05ae86
...@@ -82,7 +82,7 @@ public final class Utils { ...@@ -82,7 +82,7 @@ public final class Utils {
*/ */
public static final void updateFragment(Fragment fragment, FragmentActivity fragmentActivity) { public static final void updateFragment(Fragment fragment, FragmentActivity fragmentActivity) {
FragmentTransaction ft = fragmentActivity.getSupportFragmentManager().beginTransaction(); FragmentTransaction ft = fragmentActivity.getSupportFragmentManager().beginTransaction();
ft.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_right); ft.setCustomAnimations(R.anim.slide_in_up, R.anim.fade_out, R.anim.fade_in, R.anim.slide_out_down);
ft.replace(R.id.framelayout_for_fragment, fragment, fragment.getTag()); ft.replace(R.id.framelayout_for_fragment, fragment, fragment.getTag());
ft.addToBackStack(fragment.getTag()); ft.addToBackStack(fragment.getTag());
ft.commit(); ft.commit();
......
...@@ -645,7 +645,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On ...@@ -645,7 +645,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
/* Animate only for UserFragment */ /* Animate only for UserFragment */
if (fragment instanceof UserFragment) { if (fragment instanceof UserFragment) {
transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_right); transaction.setCustomAnimations(R.anim.slide_in_up, R.anim.fade_out, R.anim.fade_in, R.anim.slide_out_down);
} }
transaction.replace(R.id.framelayout_for_fragment, fragment, fragment.getTag()); transaction.replace(R.id.framelayout_for_fragment, fragment, fragment.getTag());
......
...@@ -146,7 +146,7 @@ public class AddEventFragment extends BaseFragment { ...@@ -146,7 +146,7 @@ public class AddEventFragment extends BaseFragment {
eventFragment.setArguments(bundle); eventFragment.setArguments(bundle);
FragmentManager manager = getActivity().getSupportFragmentManager(); FragmentManager manager = getActivity().getSupportFragmentManager();
FragmentTransaction transaction = manager.beginTransaction(); FragmentTransaction transaction = manager.beginTransaction();
transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_right); transaction.setCustomAnimations(R.anim.slide_in_up, R.anim.fade_out, R.anim.fade_in, R.anim.slide_out_down);
transaction.replace(R.id.framelayout_for_fragment, eventFragment, eventFragment.getTag()); transaction.replace(R.id.framelayout_for_fragment, eventFragment, eventFragment.getTag());
transaction.addToBackStack(eventFragment.getTag()).commit(); transaction.addToBackStack(eventFragment.getTag()).commit();
} }
...@@ -155,7 +155,7 @@ public class AddEventFragment extends BaseFragment { ...@@ -155,7 +155,7 @@ public class AddEventFragment extends BaseFragment {
BodyFragment bodyFragment = BodyFragment.newInstance(body); BodyFragment bodyFragment = BodyFragment.newInstance(body);
FragmentManager manager = getActivity().getSupportFragmentManager(); FragmentManager manager = getActivity().getSupportFragmentManager();
FragmentTransaction transaction = manager.beginTransaction(); FragmentTransaction transaction = manager.beginTransaction();
transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left, R.anim.slide_in_right, R.anim.slide_out_right); transaction.setCustomAnimations(R.anim.slide_in_up, R.anim.fade_out, R.anim.fade_in, R.anim.slide_out_down);
transaction.replace(R.id.framelayout_for_fragment, bodyFragment, bodyFragment.getTag()); transaction.replace(R.id.framelayout_for_fragment, bodyFragment, bodyFragment.getTag());
transaction.addToBackStack(bodyFragment.getTag()).commit(); transaction.addToBackStack(bodyFragment.getTag()).commit();
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<set> <set>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" <objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="400" android:duration="400"
android:propertyName="x" android:propertyName="alpha"
android:valueFrom="0" android:valueFrom="0"
android:valueTo="-1280" android:valueTo="1"
android:valueType="floatType" /> android:valueType="floatType" />
</set> </set>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<set> <set>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" <objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="400" android:duration="400"
android:propertyName="x" android:propertyName="alpha"
android:valueFrom="-1280" android:valueFrom="1"
android:valueTo="0" android:valueTo="0"
android:valueType="floatType" /> android:valueType="floatType" />
</set> </set>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<set> <set>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" <objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="400" android:duration="400"
android:propertyName="x" android:propertyName="y"
android:valueFrom="1280" android:valueFrom="1920"
android:valueTo="0" android:valueTo="0"
android:valueType="floatType" /> android:valueType="floatType" />
</set> </set>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<set> <set>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" <objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="400" android:duration="400"
android:propertyName="x" android:propertyName="y"
android:valueFrom="0" android:valueFrom="0"
android:valueTo="1280" android:valueTo="1920"
android:valueType="floatType" /> android:valueType="floatType" />
</set> </set>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment