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 transitionToResults = new TransitionSet();
Fade fade = new Fade();
fade.addTarget(R.id.resultsText).addTarget(R.id.resultsList);
fade.setStartDelay(300);
transitionToResults.addTransition(fade);
transitionToResults.addTransition(new ChangeBounds().addTarget(R.id.searchContainer));
transitionToResults.addTransition(new Recolor().addTarget(R.id.container));
TransitionSet transitionToSearch = new TransitionSet();
transitionToSearch.addTransition(new Fade().addTarget(R.id.resultsText).
addTarget(R.id.resultsList));
transitionToSearch.addTransition(new ChangeBounds().addTarget(R.id.searchContainer));
transitionToSearch.addTransition(new Recolor().addTarget(R.id.container));
mTransitionManager = new TransitionManager();
mTransitionManager.setTransition(mSearchScreen, transitionToSearch);
mTransitionManager.setTransition(mResultsScreen, transitionToResults);