code: public void hideNaughtily(final View view, final int visibility) {
          if (durationSet) {
              view.animate().setDuration(duration);
          }
          view.animate().alpha(0f).setListener(new AnimatorListenerAdapter() {
              @Override
              public void onAnimationEnd(Animator animation) {
                  view.setAlpha(1);
                  view.setVisibility(visibility);
                  view.animate().setListener(null);
              }
          });
      }
docs: Fades out the specified view and then sets its visibility to the specified
  value (either View.INVISIBLE or View.GONE). This is a naughty method as it allows you
  to animate from INVISIBLE - GONE or vice versa (which makes sense in some parallel universe).
  
  @param view       The view to be hidden
  @param visibility The value to which the view's visibility will be set after it fades out.