I have some views in the constraint layout. I used animation to reveal and hide the view. When the view is GONE, it blinks for a second and become visible and then gone.
view.animate()
.alpha(0.0f)
.setDuration(300)
.setListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
view.setVisibility(View.GONE);
}
});