FileDocCategorySizeDatePackage
FadingHierarchy.javaAPI DocAndroid 5.1 API1823Thu Mar 12 22:22:44 GMT 2015com.android.transitiontests

FadingHierarchy

public class FadingHierarchy extends android.app.Activity

Fields Summary
android.view.ViewGroup
mRemovingContainer
android.view.ViewGroup
mContainer
android.widget.Button
mRemovingButton
boolean
mVisible
android.view.ViewGroup
mInnerContainerParent
Constructors Summary
Methods Summary
public voidonCreate(android.os.Bundle savedInstanceState)


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

        mContainer = (ViewGroup) findViewById(R.id.container);
        mRemovingContainer = (ViewGroup) findViewById(R.id.removingContainer);
        mInnerContainerParent = (ViewGroup) mRemovingContainer.getParent();

        mRemovingButton = (Button) findViewById(R.id.removingButton);
    
public voidsendMessage(android.view.View view)

        TransitionManager.beginDelayedTransition(mContainer, null);
        if (mVisible) {
            mInnerContainerParent.removeView(mRemovingContainer);
        } else {
            mInnerContainerParent.addView(mRemovingContainer);
        }
        mVisible = !mVisible;