docs/doc/reference/com/google/android/exoplayer2/util/Size.html
Package com.google.android.exoplayer2.util
[@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.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Size | UNKNOWN |
Deprecated.
A static instance to represent an unknown size value.
|
| static Size | ZERO |
Deprecated.
|
Constructors | Constructor | Description |
| --- | --- |
| Size(int width, int height) |
Deprecated.
Creates a new immutable Size instance. |
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.
|
-
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
public static final[Size](Size.html "class in com.google.android.exoplayer2.util")UNKNOWN
Deprecated.
A static instance to represent an unknown size value.
-
public static final[Size](Size.html "class in com.google.android.exoplayer2.util")ZERO
Deprecated.
-
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.
-
public int getWidth()
Deprecated.
Returns the width of the size (in pixels), or C.LENGTH_UNSET if unknown.
-
public int getHeight()
Deprecated.
Returns the height of the size (in pixels), or C.LENGTH_UNSET if unknown.
-
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
-
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")toString()
Deprecated.
Overrides:toString in class Object
-
public int hashCode()
Deprecated.
Overrides:hashCode in class Object