Beeing Jk Beeing Jk - 9 months ago 44
Android Question

Android: animation on layout after button clicked for minimum SDK version of 14

How can I do exactly the same effect as this in Android in minimum SDK version 14 application?

enter image description here

  • Background effect

  • slide toggle button

  • my minSDKVersion is 14

Is looks like a circle enlarging animation on background, or is there a more specific function for it?

many thanks...


Have a look Circular Reveal from touch point:

public boolean onTouch(View view, MotionEvent motionEvent) {
    if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {
        if (view.getId() == {
            revealFromCoordinates(motionEvent.getRawX(), motionEvent.getRawY());
    return false;

private Animator animateRevealColorFromCoordinates(int x, int y) {
    float finalRadius = (float) Math.hypot(viewRoot.getWidth(), viewRoot.getHeight());

    Animator anim = ViewAnimationUtils.createCircularReveal(viewRoot, x, y, 0, finalRadius);

enter image description here