List of usage examples for android.transition Scene Scene
public Scene(ViewGroup sceneRoot)
From source file:MainActivity.java
public void goAnimate(View view) { ViewGroup root = (ViewGroup) findViewById(R.id.layout); Scene scene = new Scene(root); Transition transition = new ChangeBounds(); TransitionManager.beginDelayedTransition(root, transition); TextView textViewTop = (TextView) findViewById(R.id.textViewTop); RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) textViewTop.getLayoutParams(); params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 1); params.addRule(RelativeLayout.ALIGN_PARENT_TOP, 0); textViewTop.setLayoutParams(params); TextView textViewBottom = (TextView) findViewById(R.id.textViewBottom); params = (RelativeLayout.LayoutParams) textViewBottom.getLayoutParams(); params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0); params.addRule(RelativeLayout.ALIGN_PARENT_TOP, 1); textViewBottom.setLayoutParams(params); TransitionManager.go(scene);// www. j av a 2s . com }