docs: protected boolean isValidLayout(Gravity gravity, Orientation orientation) {
          boolean isValid = true;
  
          switch (gravity) {
              case TOP:
              case BOTTOM:
                  isValid = (!isUnlimitedSize() && orientation == Orientation.VERTICAL);
                  break;
              case LEFT:
              case RIGHT:
                  isValid = (!isUnlimitedSize() && orientation == Orientation.HORIZONTAL);
                  break;
              case FRONT:
              case BACK:
                  isValid = (!isUnlimitedSize() && orientation == Orientation.STACK);
                  break;
              case FILL:
                  isValid = !isUnlimitedSize();
                  break;
              case CENTER:
                  break;
              default:
                  isValid = false;
                  break;
          }
          if (!isValid) {
              Log.w(TAG, "Cannot set the gravity %s and orientation %s - " +
                      "due to unlimited bounds or incompatibility", gravity, orientation);
          }
          return isValid;
      }