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(controller);
menuLayout.startLayoutAnimation();
}
@Override
public void onBackPressed(){
//super.onBackPressed();
SlideOut();
}
I have commented out super.OnBackPressed() to see if the animation starts, and it don't start.
Somebody with similar problems ?
check if SlideOut() is called in onBackPressed - i'm guessing your back press is being handled elsewhere - possibly by the virtual keyboard