FileDocCategorySizeDatePackage
SequenceTestSimple.javaAPI DocAndroid 5.1 API2786Thu Mar 12 22:22:44 GMT 2015com.android.transitiontests

SequenceTestSimple

public class SequenceTestSimple extends android.app.Activity

Fields Summary
android.widget.Button
mRemovingButton
android.widget.Button
mInvisibleButton
android.widget.Button
mGoneButton
android.transition.Scene
mScene1
android.transition.Scene
mScene2
android.view.ViewGroup
mSceneRoot
android.transition.Transition
sequencedFade
android.transition.TransitionSet
sequencedFadeReverse
android.transition.Scene
mCurrentScene
Constructors Summary
Methods Summary
public voidonCreate(android.os.Bundle savedInstanceState)

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

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

        mRemovingButton = (Button) findViewById(R.id.removingButton);

        mScene1 = Scene.getSceneForLayout(mSceneRoot, R.layout.fading_test_simple, this);
        mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.fading_test_simple2, this);

        TransitionSet fader = new TransitionSet().
                setOrdering(TransitionSet.ORDERING_SEQUENTIAL);
        fader.addTransition(new Fade().addTarget(R.id.removingButton));
        fader.addTransition(new ChangeBounds().addTarget(R.id.sceneSwitchButton));
        sequencedFade = fader;

        sequencedFadeReverse = new TransitionSet().
                setOrdering(TransitionSet.ORDERING_SEQUENTIAL);
        sequencedFadeReverse.addTransition(new ChangeBounds().addTarget(R.id.sceneSwitchButton));
        sequencedFadeReverse.addTransition(new Fade().addTarget(R.id.removingButton));

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

        if (mCurrentScene == mScene1) {
            TransitionManager.go(mScene2, sequencedFade);
            mCurrentScene = mScene2;
        } else {
            TransitionManager.go(mScene1, sequencedFadeReverse);
            mCurrentScene = mScene1;
        }