up = new TranslateAnimation(Animation.ABSOLUTE, 0, Animation.ABSOLUTE,
0, Animation.ABSOLUTE, 0, Animation.ABSOLUTE,
-layout.getLayoutParams().height);
down = new TranslateAnimation(Animation.ABSOLUTE, 0, Animation.ABSOLUTE,
0, Animation.ABSOLUTE, -layout.getLayoutParams().height, Animation.ABSOLUTE, 0);
up.setDuration(1000);
down.setDuration(1000);
up.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation animation) {
}
public void onAnimationRepeat(Animation animation) {
}
public void onAnimationEnd(Animation animation) {
layout.setVisibility(View.GONE);
}
});
down.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation animation) {
layout.setVisibility(View.VISIBLE);
}
public void onAnimationRepeat(Animation animation) {
}
public void onAnimationEnd(Animation animation) {
}
});
0, Animation.ABSOLUTE, 0, Animation.ABSOLUTE,
-layout.getLayoutParams().height);
down = new TranslateAnimation(Animation.ABSOLUTE, 0, Animation.ABSOLUTE,
0, Animation.ABSOLUTE, -layout.getLayoutParams().height, Animation.ABSOLUTE, 0);
up.setDuration(1000);
down.setDuration(1000);
up.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation animation) {
}
public void onAnimationRepeat(Animation animation) {
}
public void onAnimationEnd(Animation animation) {
layout.setVisibility(View.GONE);
}
});
down.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation animation) {
layout.setVisibility(View.VISIBLE);
}
public void onAnimationRepeat(Animation animation) {
}
public void onAnimationEnd(Animation animation) {
}
});