FileDocCategorySizeDatePackage
Demo0.javaAPI DocAndroid 5.1 API2036Thu Mar 12 22:22:44 GMT 2015com.android.transitiontests

Demo0

public class Demo0 extends android.app.Activity

Fields Summary
private static final int
SEARCH_SCREEN
private static final int
RESULTS_SCREEN
android.view.ViewGroup
mSceneRoot
static int
mCurrentScene
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();

        mCurrentScene = SEARCH_SCREEN;
    
public voidsendMessage(android.view.View view)

        if (mCurrentScene == RESULTS_SCREEN) {
            mSceneRoot.removeAllViews();
            LayoutInflater inflater = (LayoutInflater)
                    getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            inflater.inflate(R.layout.search_screen, mSceneRoot);
            mCurrentScene = SEARCH_SCREEN;
        } else {
            mSceneRoot.removeAllViews();
            LayoutInflater inflater = (LayoutInflater)
                    getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            inflater.inflate(R.layout.results_screen, mSceneRoot);
            mCurrentScene = RESULTS_SCREEN;
        }