FileDocCategorySizeDatePackage
InterruptionTest.javaAPI DocAndroid 5.1 API2960Thu Mar 12 22:22:44 GMT 2015com.android.transitiontests

InterruptionTest

public class InterruptionTest extends android.app.Activity

Fields Summary
android.widget.RadioButton
mScene1RB
android.widget.RadioButton
mScene2RB
android.widget.RadioButton
mScene3RB
android.widget.RadioButton
mScene4RB
private android.transition.Scene
mScene1
private android.transition.Scene
mScene2
private android.transition.Scene
mScene3
private android.transition.Scene
mScene4
android.transition.TransitionSet
mSequencedMove
Constructors Summary
Methods Summary
public voidonCreate(android.os.Bundle savedInstanceState)


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

        ViewGroup sceneRoot = (ViewGroup) findViewById(R.id.sceneRoot);

        mScene1 = Scene.getSceneForLayout(sceneRoot, R.layout.interruption_inner_1, this);
        mScene2 = Scene.getSceneForLayout(sceneRoot, R.layout.interruption_inner_2, this);
        mScene3 = Scene.getSceneForLayout(sceneRoot, R.layout.interruption_inner_3, this);
        mScene4 = Scene.getSceneForLayout(sceneRoot, R.layout.interruption_inner_4, this);

        mScene1RB = (RadioButton) findViewById(R.id.scene1RB);
        mScene2RB = (RadioButton) findViewById(R.id.scene2RB);
        mScene3RB = (RadioButton) findViewById(R.id.scene3RB);
        mScene4RB = (RadioButton) findViewById(R.id.scene4RB);

        ChangeBounds changeBounds1 = new ChangeBounds();
        changeBounds1.addTarget(R.id.button);
        ChangeBounds changeBounds2 = new ChangeBounds();
        changeBounds2.addTarget(R.id.button1);

        mSequencedMove.addTransition(changeBounds1).addTransition(changeBounds2);
        mSequencedMove.setDuration(1000);
    
public voidonRadioButtonClicked(android.view.View clickedButton)

        if (clickedButton == mScene1RB) {
            TransitionManager.go(mScene1, mSequencedMove);
        } else if (clickedButton == mScene2RB) {
            TransitionManager.go(mScene2, mSequencedMove);
        } else if (clickedButton == mScene3RB) {
            TransitionManager.go(mScene3, mSequencedMove);
        } else {
            TransitionManager.go(mScene4, mSequencedMove);
        }