Hide animations and android la s in the android Layout
Android provides attributes in the layout, allowing you to simply add animation effects as follows:
<LinearLayout... animateLayoutChanges = "true".../>
When the view in the layout is deleted, hidden or displayed, there will be a fade in and fade out, and a displacement animation.
In addition to the XML layout fileAnimateLayoutChanges
Attribute. You can also createLayoutTransition
The object is set through the setLayoutTransition () method. The source code is as follows:
Private ViewGroup mContainerView; @ Overrideprotected void onCreate (Bundle savedInstanceState) {super. onCreate (savedInstanceState); setContentView (R. layout. custom_linear_layout); mContainerView = (ViewGroup) findViewById (R. id. container); LayoutTransition lt = new LayoutTransition (); lt. disableTransitionType (LayoutTransition. DISAPPEARING); mContainerView. setLayoutTransition (lt );}
More effects: http://www.cnblogs.com/avenwu/archive/2013/07/02/3167020.html
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.