VideoSize
public
class
VideoSize
extends Object
implements
VersionedParcelable
java.lang.Object | |
↳ | androidx.media2.common.VideoSize |
Immutable class for describing video size.
Summary
Public constructors | |
---|---|
VideoSize(int width, int height)
Creates a new immutable VideoSize instance. |
Public methods | |
---|---|
boolean
|
equals(Object obj)
Checks if this video size is equal to another video size. |
int
|
getHeight()
Returns the height of the video. |
int
|
getWidth()
Returns the width of the video. |
int
|
hashCode()
|
String
|
toString()
Return the video size represented as a string with the format |
Inherited methods | |
---|---|
Public constructors
VideoSize
public VideoSize (int width, int height)
Creates a new immutable VideoSize instance.
Parameters | |
---|---|
width |
int : The width of the video |
height |
int : The height of the video
|
Public methods
equals
public boolean equals (Object obj)
Checks if this video size is equal to another video size.
Two video sizes are equal if and only if both their widths and heights are equal.
A video size object is never equal to any other type of object.
Parameters | |
---|---|
obj |
Object |
Returns | |
---|---|
boolean |
true if the objects were equal, false otherwise
|
getHeight
public int getHeight ()
Returns the height of the video.
Returns | |
---|---|
int |
getWidth
public int getWidth ()
Returns the width of the video.
Returns | |
---|---|
int |
hashCode
public int hashCode ()
Returns | |
---|---|
int |
toString
public String toString ()
Return the video size represented as a string with the format "WxH"
Returns | |
---|---|
String |
string representation of the video size |