Android examples for android.view.animation:Hide Animation
hide view with translation animation
import android.view.View; public class Main { public static void hide(View view) { if (view.getVisibility() == View.GONE) return;/*from w ww. j a va2 s. co m*/ view.setVisibility(View.VISIBLE); view.animate().translationY(view.getHeight() * 2f).alpha(0f).withEndAction(() -> view.setVisibility(View.GONE)) .start(); } }