The Android Developer Challenge is back! Submit your idea before December 2.

VideoSize

class VideoSize
kotlin.Any
   ↳ androidx.media2.player.VideoSize

Immutable class for describing video size.

Summary

Public constructors

<init>(width: Int, height: Int)

Creates a new immutable VideoSize instance.

Public methods

Boolean
equals(other: Any?)

Checks if this video size is equal to another video size.

Int

Returns the height of the video.

Int

Returns the width of the video.

Int

String

Return the video size represented as a string with the format "WxH"

Public constructors

<init>

VideoSize(width: Int, height: Int)

Creates a new immutable VideoSize instance.

Parameters
width Int: The width of the video
height Int: The height of the video

Public methods

equals

fun equals(other: Any?): Boolean

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.

Return
Boolean: true if the objects were equal, false otherwise

getHeight

fun getHeight(): Int

Returns the height of the video.

getWidth

fun getWidth(): Int

Returns the width of the video.

hashCode

fun hashCode(): Int

toString

fun toString(): String

Return the video size represented as a string with the format "WxH"

Return
String: string representation of the video size