public final class AbsoluteFontSize extends FontSize
FontSize
implementation to define the absolute font size in
pixels. Font Size
property:
public FontSize getMyFontSize() { final AbsoluteFontSize size = new AbsoluteFontSize(12, true); return size; }This class is not meant to be extended by clients.
This class is deprecated and will be removed. Consider migrating your font
sizes to FloatFontSize
.
Constructor and Description |
---|
AbsoluteFontSize(int sizeInPixels)
Deprecated.
Create an
AbsoluteFontSize and deliver the absolute font size in
pixels. |
AbsoluteFontSize(int sizeInPixels,
boolean accessibilityAdjusted)
Deprecated.
Create an
AbsoluteFontSize and deliver the absolute font size in
pixels. |
Modifier and Type | Method and Description |
---|---|
int |
getSizeInPixels()
Deprecated.
|
boolean |
isAccessibilityAdjusted()
Deprecated.
|
float |
toFloat()
Deprecated.
Converts this FontSize into a float value.
|
public AbsoluteFontSize(int sizeInPixels)
AbsoluteFontSize
and deliver the absolute font size in
pixels. sizeInPixels
must be greater than 0.sizeInPixels
- public AbsoluteFontSize(int sizeInPixels, boolean accessibilityAdjusted)
AbsoluteFontSize
and deliver the absolute font size in
pixels.
The sizeInPixels
must be greater than 0.
Allow the native platform to scale the actual font size depending on system
properties.
sizeInPixels
- accessibilityAdjusted
- public boolean isAccessibilityAdjusted()
public int getSizeInPixels()