public class Size extends Object
Constructor and Description |
---|
Size(float height,
SizeLayoutType heightLayoutType,
float width,
SizeLayoutType widthLayoutType)
Convenience constructor.
|
Size(SizeMetric height,
SizeMetric width)
Creates a new SizeMetrics instance using the specified size layout algorithm and value.
|
Modifier and Type | Method and Description |
---|---|
SizeMetric |
getHeight() |
android.graphics.RectF |
getRectF(android.graphics.RectF canvasRect)
Calculates a RectF with calculated width and height.
|
android.graphics.RectF |
getRoundedRect(android.graphics.RectF canvasRect)
Same as getRectF but with edges rounded to the nearest full pixel.
|
SizeMetric |
getWidth() |
void |
setHeight(SizeMetric height) |
void |
setWidth(SizeMetric width) |
public static Size FILL
public Size(float height, SizeLayoutType heightLayoutType, float width, SizeLayoutType widthLayoutType)
Size(SizeMetric, SizeMetric)
.height
- Height value used algorithm to calculate the height of the associated widget(s).heightLayoutType
- Algorithm used to calculate the height of the associated widget(s).width
- Width value used algorithm to calculate the width of the associated widget(s).widthLayoutType
- Algorithm used to calculate the width of the associated widget(s).public Size(SizeMetric height, SizeMetric width)
SizeMetric
for details on what can be passed in.height
- width
- public SizeMetric getHeight()
public void setHeight(SizeMetric height)
public SizeMetric getWidth()
public android.graphics.RectF getRectF(android.graphics.RectF canvasRect)
canvasRect
- public android.graphics.RectF getRoundedRect(android.graphics.RectF canvasRect)
canvasRect
- public void setWidth(SizeMetric width)