code: public boolean isVisible(@Nullable TransitionValues values) {
          if (values == null) {
              return false;
          }
          int visibility = (Integer) values.values.get(PROPNAME_VISIBILITY);
          View parent = (View) values.values.get(PROPNAME_PARENT);
  
          return visibility == View.VISIBLE && parent != null;
      }
docs: Returns whether the view is 'visible' according to the given values
  object. This is determined by testing the same properties in the values
  object that are used to determine whether the object is appearing or
  disappearing in the {@link
  Transition#createAnimator(ViewGroup, TransitionValues, TransitionValues)}
  method. This method can be called by, for example, subclasses that want
  to know whether the object is visible in the same way that Visibility
  determines it for the actual animation.
  
  @param values The TransitionValues object that holds the information by
  which visibility is determined.
  @return True if the view reference by <code>values</code> is visible,
  false otherwise.