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);
TransitionManager.beginDelayedTransition(mContainer, null); if (mVisible) { mInnerContainerParent.removeView(mRemovingContainer); } else { mInnerContainerParent.addView(mRemovingContainer); } mVisible = !mVisible;