public static void applyScaleType(ImageOptions.Builder builder, final Config config) {
    switch (config.scaleType) {
      case "scale_type_none":
        builder.scale(null);
        break;
      case "scale_type_center":
        builder.scale(ScalingUtils.ScaleType.CENTER);
        break;
      case "scale_type_center_crop":
        builder.scale(ScalingUtils.ScaleType.CENTER_CROP);
        break;
      case "scale_type_center_inside":
        builder.scale(ScalingUtils.ScaleType.CENTER_INSIDE);
        break;
      case "scale_type_fit_center":
        builder.scale(ScalingUtils.ScaleType.FIT_CENTER);
        break;
      case "scale_type_fit_start":
        builder.scale(ScalingUtils.ScaleType.FIT_START);
        break;
      case "scale_type_fit_end":
        builder.scale(ScalingUtils.ScaleType.FIT_END);
        break;
      case "scale_type_fit_xy":
        builder.scale(ScalingUtils.ScaleType.FIT_XY);
        break;
    }
  }
Creates the Hierarchy using the information into the Config

@param context The Context
@param config The Config object
@return The Hierarchy to use
samples/scrollperf/src/main/java/com/facebook/samples/scrollperf/util/VitoUtil.java