public interface FontApplier
FontWidget implementation.| Modifier and Type | Field and Description |
|---|---|
static FontApplier |
DEFAULT
Default implementation of
FontApplier used by all font widgets. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyFont(FontWidget widget,
AttributeSet attrs,
int defStyleAttr,
int defStyleRes)
Applies a
Font created for the specified attrs set to the given font
widget. |
boolean |
applyFont(FontWidget widget,
Font font)
Applies the specified font to the given font widget.
|
boolean |
applyFont(FontWidget widget,
int style)
Applies a
Font created for the specified style to the given font widget. |
boolean |
applyFont(FontWidget widget,
String fontPath)
Applies a
Font created for the specified fontPath to the given font widget. |
static final FontApplier DEFAULT
FontApplier used by all font widgets.boolean applyFont(@NonNull FontWidget widget, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr, @StyleRes int defStyleRes)
Font created for the specified attrs set to the given font
widget.widget - The widget to which to apply the desired font.attrs - Attributes set which contains uiFont attribute with path
to the .ttf file for which to create the desired font.defStyleAttr - Attribute which contains a reference to a default style resource for the
given widget within a theme of the widget's associated context.defStyleRes - Resource id of the default style for the widget.True if the desired font has been applied, false otherwise.Font.create(Context, AttributeSet, int, int),
applyFont(FontWidget, Font)boolean applyFont(@NonNull FontWidget widget, @StyleRes int style)
Font created for the specified style to the given font widget.widget - The widget to which to apply the desired font.style - Resource to style which contains uiFont attribute with
path to the .ttf file for which to create the desired font.True if the desired font has been applied, false otherwise.Font.create(Context, int),
applyFont(FontWidget, Font)boolean applyFont(@NonNull FontWidget widget, @NonNull String fontPath)
Font created for the specified fontPath to the given font widget.widget - The widget to which to apply the desired font.fontPath - Path to the .ttf file for which to create the desired font.True if the desired font has been applied, false otherwise.Font.create(String),
applyFont(FontWidget, Font)boolean applyFont(@NonNull FontWidget widget, @Nullable Font font)
widget - The widget to which to apply the desired font.font - The desired font to apply to the given widget.True if the desired font has been applied, false otherwise.Font.getTypeface(Context)