code: public void setOrientation(final Orientation orientation) {
          if (orientation != mOrientation) {
              mOrientation = orientation;
              if (mContainer != null) {
                  mContainer.onLayoutChanged(this);
              }
          }
      }
docs: Set the {@link Orientation} of the layout. The new orientation can be rejected if it is in conflict with the
  currently applied Gravity
  
  @param orientation
  One of the {@link Orientation} constants.