Circular reveal animation on Android

Android

Hey folks, I was looking to make my app Ui/Ux more attractive and fascinated so I used circular revel effect when I was moving one screen to another screen.

1.Let create circular reveal f(n) using ViewAnimationUtils class.

// create the animator for this view (the start radius is zero)
Animator circularReveal = ViewAnimationUtils.createCircularReveal(rootLayout, x, y, 0, finalRadius);
circularReveal.setDuration(450);
circularReveal.setInterpolator(new AccelerateInterpolator());

2. Add the listener on animation class object and

circularReveal.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
if (!animation.isRunning())
getWindow().getDecorView().setBackgroundColor(getResources().getColor(R.color.home_bg_color));
super.onAnimationEnd(animation);
}

3. Override the on animation start f(n).

@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
getWindow().getDecorView().setBackgroundColor(getResources().getColor(R.color.revealColor));
}
});
circularReveal.start();
} else {
finish();
}
}

For further knowledge about class and method check this link.
https://developer.android.com/reference/android/view/ViewAnimationUtils.html

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Android
Android: Overdraw, Why Should We Care?

Recently I am looking for new stuff for you and i found really interesting fact of our android app. Which is very interesting, Have you look it your android app, why it is slow or and crashes happens some time, all those dispute things happen because we are doesn’t carrying …

Android
Android basic app

Today I’ll tell you how to start with Android. For the readers who are familiar with basics of Java, it will be easier for them as code is written for Android apps requires Java programming.

Android
2
Animated Splash Screen to you Android App using Android Studio

Today I am switching you to one finest technology of this world and that is Android. In this tutorial I am showing you how you can create a animated Splash screen which is the first part of any android application creation.