Back to Exoplayer

Size (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/util/Size.html

latest3.8 KB
Original Source

Package com.google.android.exoplayer2.util

Class Size


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classSizeextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

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 Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static Size | UNKNOWN | Deprecated.

A static instance to represent an unknown size value. | | static Size | ZERO | Deprecated. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Size​(int width, int height) | Deprecated.

Creates a new immutable Size instance. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | boolean | equals​(Object obj) | Deprecated. | | int | getHeight() | Deprecated.

Returns the height of the size (in pixels), or C.LENGTH_UNSET if unknown. | | int | getWidth() | Deprecated.

Returns the width of the size (in pixels), or C.LENGTH_UNSET if unknown. | | int | hashCode() | Deprecated. | | String | toString() | Deprecated. |

- 

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

- 

UNKNOWN

public static final[Size](Size.html "class in com.google.android.exoplayer2.util")UNKNOWN

Deprecated.

A static instance to represent an unknown size value.

- 

ZERO

public static final[Size](Size.html "class in com.google.android.exoplayer2.util")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](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)

Deprecated. Overrides:equals in class Object

- 

toString

public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")toString()

Deprecated. Overrides:toString in class Object

- 

hashCode

public int hashCode()

Deprecated. Overrides:hashCode in class Object