if (mTransitionManager == null) {
try {
TransitionInflater inflater = TransitionInflater.from(this);
mTransitionManager =
inflater.inflateTransitionManager(R.transition.my_transition_mgr,
mSceneRoot);
Scene loadedScene = new Scene(mSceneRoot);
System.out.println("loadedScene = " + loadedScene);
Transition loadedTransition = inflater.inflateTransition(R.transition.my_transition);
System.out.println("loadedTransition = " + loadedTransition);
} catch (Exception e) {
System.out.println("Problem loading scene resource: " + e);
}
}
if (mCurrentScene == RESULTS_SCREEN) {
Scene scene = Scene.getSceneForLayout(mSceneRoot, R.layout.search_screen, this);
mTransitionManager.transitionTo(scene);
mCurrentScene = SEARCH_SCREEN;
} else {
Scene scene = Scene.getSceneForLayout(mSceneRoot, R.layout.results_screen, this);
mTransitionManager.transitionTo(scene);
mCurrentScene = RESULTS_SCREEN;
}