Size


public final class Size
extends Object

java.lang.Object
   ↳ android.util.Size


Immutable class for describing width and height dimensions in pixels.

Summary

Public constructors

Size(int width, int height)

Create a new immutable Size instance.

Public methods

boolean equals(Object obj)

Check if this size is equal to another size.

int getHeight()

Get the height of the size (in pixels).

int getWidth()

Get the width of the size (in pixels).

int hashCode()

Returns a hash code value for the object.

static Size parseSize(String string)

Parses the specified string as a size value.

String toString()

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

Inherited methods