How can I start layoutAnimation when(before) leaving an activity
问题 I have a LinearLayout View in my activity. When I press back button I want LinearLayout's children to slide out. I have the following code which doesn't do anything: private void SlideOut() { LayoutAnimationController controller = AnimationUtils.loadLayoutAnimation(this, R.anim.layout_animation_row_slide_out); Animation animation=controller.getAnimation(); animation.setFillAfter(true); LinearLayout menuLayout =((LinearLayout)findViewById(R.id.menuLayout)); menuLayout.setLayoutAnimation