Package 

Enum Precision

  • All Implemented Interfaces:
    java.io.Serializable , kotlin.Comparable

    
    public enum Precision
    extends Enum<Precision>
                        

    Represents the required precision for the size of an image in an image request.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      AUTOMATIC

      Allow Coil to automatically determine if the size needs to be exact for this request.

      This is the default value for ImageRequest.Builder.precision.

      INEXACT

      Allow the size of the loaded image to not match the requested dimensions exactly. This enables several optimizations:

      • If the requested dimensions are larger than the original size of the image, it will be loaded using its original dimensions. This uses less memory.

      • If the image is present in the memory cache at a larger size than the request's dimensions, it will be returned. This increases the hit rate of the memory cache.

      Prefer this option if your target can scale the loaded image (e.g. ImageView).

      EXACT

      Require that the loaded image's dimensions match the request's size and scale exactly.

    • Method Summary

      Modifier and Type Method Description
      final String getName()
      final Integer getOrdinal()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait