Java tutorial
//package com.java2s; //License from project: Apache License import android.animation.ObjectAnimator; import android.support.annotation.NonNull; import android.view.View; public class Main { public static final int DURATION_MID = 800; public static void alphaShow(@NonNull final View view) { if (view.getWindowToken() == null) return; view.setVisibility(View.VISIBLE); ObjectAnimator alpha = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f); alpha.setDuration(DURATION_MID); alpha.start(); } }