Example usage for android.transition Fade addTarget

List of usage examples for android.transition Fade addTarget

Introduction

In this page you can find the example usage for android.transition Fade addTarget.

Prototype

public Transition addTarget(int targetId) 

Source Link

Document

Adds the id of a target view that this Transition is interested in animating.

Usage

From source file:com.melkir.ourstreets.fragment.GalleryFragment.java

public GalleryFragment() {

    final Fade fade = new Fade();
    fade.addTarget(R.id.appbar);

    Explode explode = new Explode();
    explode.excludeTarget(R.id.appbar, true);

    Elevation elevation = new Elevation();
    elevation.addTarget(R.id.gallery_card);
    elevation.setStartDelay(250); // arbitrarily chosen delay

    TransitionSet exit = new TransitionSet();
    exit.addTransition(fade);/*from w w  w . j  av  a 2 s .  co  m*/
    exit.addTransition(explode);
    exit.addTransition(elevation);

    setExitTransition(exit);
}