public final class TextStyle extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
TextStyle.Builder
A builder class for creating text styles.
|
Modifier and Type | Method and Description |
---|---|
TextStyle.Builder |
asBuilder()
|
void |
close() |
protected void |
finalize() |
String |
getFontName()
Returns the identifier of the font used for text rendering.
|
long |
getFontSize()
Returns the font size in pixels, where a pixel is defined as 1/96th of 1 inch (https://www.w3.org/TR/css-values-4/#absolute-lengths).
|
android.graphics.Color |
getHaloColor()
Returns the color of the halo (outline) around text.
|
double |
getHaloWidth()
Returns the size of the halo (outline) around text in pixels.
|
android.graphics.Color |
getTextColor()
Returns the text color.
|
static TextStyle.Builder |
newBuilder()
Creates a new builder for creating a
TextStyle . |
public void close()
close
in interface AutoCloseable
@NotNull public static TextStyle.Builder newBuilder()
TextStyle
.TextStyle
.@NotNull public TextStyle.Builder asBuilder()
@NotNull public String getFontName()
Possible values: Serif, Sans, Arial Black, Arial Narrow, Calibri, Noto.
public long getFontSize()
@NotNull public android.graphics.Color getTextColor()
public double getHaloWidth()
If this value is equal to zero, no halo is drawn.
@NotNull public android.graphics.Color getHaloColor()