Class Size


  • @Deprecated
    public final class Size
    extends Object
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Immutable class for describing width and height dimensions in pixels.
    • Field Detail

      • UNKNOWN

        public static final Size UNKNOWN
        Deprecated.
        A static instance to represent an unknown size value.
      • ZERO

        public static final Size ZERO
        Deprecated.
    • Constructor Detail

      • Size

        public Size​(int width,
                    int height)
        Deprecated.
        Creates a new immutable Size instance.
        Parameters:
        width - The width of the size, in pixels, or C.LENGTH_UNSET if unknown.
        height - The height of the size, in pixels, or C.LENGTH_UNSET if unknown.
        Throws:
        IllegalArgumentException - if an invalid width or height is specified.
    • Method Detail

      • getWidth

        public int getWidth()
        Deprecated.
        Returns the width of the size (in pixels), or C.LENGTH_UNSET if unknown.
      • getHeight

        public int getHeight()
        Deprecated.
        Returns the height of the size (in pixels), or C.LENGTH_UNSET if unknown.
      • equals

        public boolean equals​(@Nullable
                              Object obj)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object