Size
@UnstableApi
public final class Size
Immutable class for describing width and height dimensions in pixels.
Summary
Public constructors |
|---|
Size(int width, int height)Creates a new immutable Size instance. |
Public methods |
|
|---|---|
boolean |
|
static Size |
@UnstableApi |
int |
Returns the height of the size (in pixels), or |
int |
getWidth()Returns the width of the size (in pixels), or |
int |
hashCode() |
Bundle |
|
String |
toString() |
Constants
Public constructors
Size
public Size(int width, int height)
Creates a new immutable Size instance.
| Parameters | |
|---|---|
int width |
The width of the size, in pixels, or |
int height |
The height of the size, in pixels, or |
| Throws | |
|---|---|
java.lang.IllegalArgumentException |
if an invalid |
Public methods
getHeight
public int getHeight()
Returns the height of the size (in pixels), or LENGTH_UNSET if unknown.
getWidth
public int getWidth()
Returns the width of the size (in pixels), or LENGTH_UNSET if unknown.