public final class Iconics
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Iconics.IconicsBuilder |
static class |
Iconics.IconicsBuilderString |
static class |
Iconics.IconicsBuilderView |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TAG |
| Modifier and Type | Method and Description |
|---|---|
static ITypeface |
findFont(android.content.Context ctx,
java.lang.String key)
tries to find a font by its key in all registered FONTS
|
static ITypeface |
findFont(IIcon icon)
fetches the font from the Typeface of an IIcon
|
static IconicsAnimationProcessor |
findProcessor(android.content.Context ctx,
java.lang.String animationTag) |
static java.util.Collection<ITypeface> |
getRegisteredFonts(android.content.Context ctx)
return all registered FONTS
|
static boolean |
iconExists(android.content.Context context,
java.lang.String icon)
Test if the icon exists in the currently loaded fonts
|
static void |
init(android.content.Context ctx)
initializes the FONTS.
|
static void |
markInitDone()
This allows to mark the initialization as done, even if `init(Context ctx)` was not called prior.
|
static boolean |
registerFont(ITypeface font)
Registers a fonts into the FONTS array for performance
|
static void |
registerProcessor(IconicsAnimationProcessor processor) |
static android.text.Spanned |
style(android.content.Context ctx,
java.util.HashMap<java.lang.String,ITypeface> fonts,
android.text.Spanned textSpanned,
java.util.List<android.text.style.CharacterStyle> styles,
java.util.HashMap<java.lang.String,java.util.List<android.text.style.CharacterStyle>> stylesFor)
Creates a new SpannableStringBuilder and will iterate over the textSpanned once and copy over
all characters, it will also directly replace icon font placeholders with the correct mapping.
|
static android.text.Spanned |
style(android.content.Context ctx,
android.text.Spanned textSpanned)
Creates a new SpannableStringBuilder and will iterate over the textSpanned once and copy over
all characters, it will also directly replace icon font placeholders with the correct mapping.
|
static void |
styleEditable(android.content.Context ctx,
android.text.Editable editable)
Iterates over the editable once and replace icon font placeholders with the correct mapping.
|
static void |
styleEditable(android.content.Context ctx,
java.util.HashMap<java.lang.String,ITypeface> fonts,
android.text.Editable textSpanned,
java.util.List<android.text.style.CharacterStyle> styles,
java.util.HashMap<java.lang.String,java.util.List<android.text.style.CharacterStyle>> stylesFor)
Iterates over the editable once and replace icon font placeholders with the correct mapping.
|
public static void init(android.content.Context ctx)
public static void markInitDone()
public static boolean iconExists(android.content.Context context,
java.lang.String icon)
context - A context to access application resourcesicon - The icon to verifypublic static boolean registerFont(ITypeface font)
public static void registerProcessor(IconicsAnimationProcessor processor)
public static IconicsAnimationProcessor findProcessor(android.content.Context ctx, java.lang.String animationTag)
public static java.util.Collection<ITypeface> getRegisteredFonts(android.content.Context ctx)
public static ITypeface findFont(android.content.Context ctx, java.lang.String key)
public static ITypeface findFont(IIcon icon)
public static android.text.Spanned style(android.content.Context ctx,
android.text.Spanned textSpanned)
public static android.text.Spanned style(android.content.Context ctx,
java.util.HashMap<java.lang.String,ITypeface> fonts,
android.text.Spanned textSpanned,
java.util.List<android.text.style.CharacterStyle> styles,
java.util.HashMap<java.lang.String,java.util.List<android.text.style.CharacterStyle>> stylesFor)
public static void styleEditable(android.content.Context ctx,
android.text.Editable editable)
public static void styleEditable(android.content.Context ctx,
java.util.HashMap<java.lang.String,ITypeface> fonts,
android.text.Editable textSpanned,
java.util.List<android.text.style.CharacterStyle> styles,
java.util.HashMap<java.lang.String,java.util.List<android.text.style.CharacterStyle>> stylesFor)