FileDocCategorySizeDatePackage
ScenesTestAutoTargets.javaAPI DocAndroid 5.1 API2364Thu Mar 12 22:22:44 GMT 2015com.android.transitiontests

ScenesTestAutoTargets

public class ScenesTestAutoTargets extends android.app.Activity

Fields Summary
android.view.ViewGroup
mSceneRoot
static android.transition.Scene
mCurrentScene
android.transition.TransitionManager
mTransitionManager
android.transition.Scene
mResultsScreen
android.transition.Scene
mSearchScreen
Constructors Summary
Methods Summary
public voidonCreate(android.os.Bundle savedInstanceState)


    
        
        super.onCreate(savedInstanceState);
        setContentView(R.layout.search_screen);

        View container = (View) findViewById(R.id.container);
        mSceneRoot = (ViewGroup) container.getParent();

        mSearchScreen = Scene.getSceneForLayout(mSceneRoot, R.layout.search_screen, this);
        mResultsScreen = Scene.getSceneForLayout(mSceneRoot, R.layout.results_screen, this);

        TransitionSet transition = new TransitionSet();
        transition.addTransition(new Fade()).addTransition(new ChangeBounds()).addTransition(new Recolor());

        mTransitionManager = new TransitionManager();
        mTransitionManager.setTransition(mSearchScreen, transition);
        mTransitionManager.setTransition(mResultsScreen, transition);
    
public voidsendMessage(android.view.View view)

        if (mCurrentScene == mResultsScreen) {
            mTransitionManager.transitionTo(mSearchScreen);
            mCurrentScene = mSearchScreen;
        } else {
            mTransitionManager.transitionTo(mResultsScreen);
            mCurrentScene = mResultsScreen;
        }