FileDocCategorySizeDatePackage
ChangingText.javaAPI DocAndroid 5.1 API2078Thu Mar 12 22:22:44 GMT 2015com.android.transitiontests

ChangingText

public class ChangingText extends android.app.Activity

Fields Summary
android.transition.Scene
mScene1
android.transition.Scene
mScene2
android.view.ViewGroup
mSceneRoot
android.transition.TransitionSet
mChanger
android.transition.Scene
mCurrentScene
Constructors Summary
Methods Summary
public voidonCreate(android.os.Bundle savedInstanceState)

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

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

        mScene1 = Scene.getSceneForLayout(mSceneRoot, R.layout.changing_text_1, this);
        mScene2 = Scene.getSceneForLayout(mSceneRoot, R.layout.changing_text_2, this);

        mChanger = new TransitionSet().setOrdering(TransitionSet.ORDERING_TOGETHER);
        mChanger.addTransition(new ChangeBounds()).addTransition(new ChangeText());

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

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