Example usage for android.transition Scene getSceneForLayout

List of usage examples for android.transition Scene getSceneForLayout

Introduction

In this page you can find the example usage for android.transition Scene getSceneForLayout.

Prototype

public static Scene getSceneForLayout(ViewGroup sceneRoot, int layoutId, Context context) 

Source Link

Document

Returns a Scene described by the resource file associated with the given layoutId parameter.

Usage

From source file:tabhostapp.com.tabhostapp.DetailFragment.java

@Override
public void onAnimationEnd(Animation animation) {
    // This method is called at the end of the animation for the fragment transaction,
    // which is perfect time to start our Transition.
    final Scene scene = Scene.getSceneForLayout((ViewGroup) getView(), R.layout.fragment_detail_content,
            getActivity());//ww  w  . j a  v  a2  s. com
    TransitionManager.go(scene);
    // Note that we need to bind views with data after we call TransitionManager.go().
    bind(scene.getSceneRoot());
}

From source file:com.dev.foundingfourfathers.alchemy.BrowseCocktails.DetailFragment.java

@Override
public void onAnimationEnd(Animation animation) {
    // This method is called at the end of the animation for the fragment transaction,
    // which is perfect time to start our Transition.
    //Log.i(TAG, "Fragment animation ended. Starting a Transition.");

    final Scene scene = Scene.getSceneForLayout((ViewGroup) getView(), R.layout.fragment_detail_content,
            getActivity());//w  w  w .j a  v  a2s  .c  o  m
    TransitionManager.go(scene);
    // Note that we need to bind views with data after we call TransitionManager.go().
    bind(scene.getSceneRoot());
    setText(DRINK);
}