android Programming Glossary: expandcollapseanimation
Slide down effect on ExpandableListView http://stackoverflow.com/questions/8780292/slide-down-effect-on-expandablelistview expand animations. @author Esben Gaarsmand public class ExpandCollapseAnimation extends Animation private View mAnimatedView private int mEndHeight.. @param view The view to animate @param duration public ExpandCollapseAnimation View view int duration setDuration duration mAnimatedView view.. with wrap_content as height. This should be done before ExpandCollapseAnimation is created. @param activity @param view public static void setHeightForWrapContent..
Android animate drop down/up view proper http://stackoverflow.com/questions/9248930/android-animate-drop-down-up-view-proper expand animations. @author Esben Gaarsmand public class ExpandCollapseAnimation extends Animation private View mAnimatedView private int mEndHeight.. in xml. 1 will collapse view and set to gone public ExpandCollapseAnimation View view int duration int type setDuration duration mAnimatedView.. new OnClickListener @Override public void onClick View v ExpandCollapseAnimation animation null if mActive animation new ExpandCollapseAnimation..
Slide down effect on ExpandableListView http://stackoverflow.com/questions/8780292/slide-down-effect-on-expandablelistview Class for handling collapse and expand animations. @author Esben Gaarsmand public class ExpandCollapseAnimation extends Animation private View mAnimatedView private int mEndHeight private int mStartVisibility Initializes expand collapse.. if it is visible the animation will be collapse from bottom @param view The view to animate @param duration public ExpandCollapseAnimation View view int duration setDuration duration mAnimatedView view mEndHeight mAnimatedView.getLayoutParams .height mStartVisibility.. can be used to calculate the height and set itm for views with wrap_content as height. This should be done before ExpandCollapseAnimation is created. @param activity @param view public static void setHeightForWrapContent Activity activity View view DisplayMetrics..
Android animate drop down/up view proper http://stackoverflow.com/questions/9248930/android-animate-drop-down-up-view-proper Class for handling collapse and expand animations. @author Esben Gaarsmand public class ExpandCollapseAnimation extends Animation private View mAnimatedView private int mEndHeight private int mType Initializes expand collapse animation.. expand from gone and 0 size to visible and layout size defined in xml. 1 will collapse view and set to gone public ExpandCollapseAnimation View view int duration int type setDuration duration mAnimatedView view mEndHeight mAnimatedView.getLayoutParams .height.. Button findViewById R.id.button button.setOnClickListener new OnClickListener @Override public void onClick View v ExpandCollapseAnimation animation null if mActive animation new ExpandCollapseAnimation animatedButton 1000 1 mActive false else animation..
|