public class TextStyleBuilder
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
TextStyleBuilder.TextStyle
Enum to maintain current supported style properties used on on
PhotoEditor.addText(String, TextStyleBuilder) and PhotoEditor.editText(View, String, TextStyleBuilder) |
| Constructor and Description |
|---|
TextStyleBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyBackgroundColor(android.widget.TextView textView,
int color) |
protected void |
applyBackgroundDrawable(android.widget.TextView textView,
android.graphics.drawable.Drawable bg) |
protected void |
applyFontFamily(android.widget.TextView textView,
android.graphics.Typeface typeface) |
protected void |
applyGravity(android.widget.TextView textView,
int gravity) |
protected void |
applyTextAppearance(android.widget.TextView textView,
int styleAppearance) |
protected void |
applyTextColor(android.widget.TextView textView,
int color) |
protected void |
applyTextSize(android.widget.TextView textView,
float size) |
protected java.util.Map<TextStyleBuilder.TextStyle,java.lang.Object> |
getValues() |
void |
withBackgroundColor(int background)
Set this background color
|
void |
withBackgroundDrawable(android.graphics.drawable.Drawable bgDrawable)
Set this background
Drawable, this method overrides the preview set on withBackgroundColor(int) |
void |
withGravity(int gravity)
Set this gravity style
|
void |
withTextAppearance(int textAppearance)
Set this textAppearance style
|
void |
withTextColor(int color)
Set this color style
|
void |
withTextFont(android.graphics.Typeface textTypeface)
Set this
Typeface style |
void |
withTextSize(float size)
Set this textSize style
|
protected java.util.Map<TextStyleBuilder.TextStyle,java.lang.Object> getValues()
public void withTextSize(float size)
size - Size to apply on textpublic void withTextColor(int color)
color - Color to apply on textpublic void withTextFont(android.graphics.Typeface textTypeface)
Typeface styletextTypeface - TypeFace to apply on textpublic void withGravity(int gravity)
gravity - Gravity style to apply on textpublic void withBackgroundColor(int background)
background - Background color to apply on text, this method overrides the preview set on withBackgroundDrawable(Drawable)public void withBackgroundDrawable(android.graphics.drawable.Drawable bgDrawable)
Drawable, this method overrides the preview set on withBackgroundColor(int)bgDrawable - Background drawable to apply on textpublic void withTextAppearance(int textAppearance)
textAppearance - Text style to apply on textprotected void applyTextSize(android.widget.TextView textView,
float size)
protected void applyTextColor(android.widget.TextView textView,
int color)
protected void applyFontFamily(android.widget.TextView textView,
android.graphics.Typeface typeface)
protected void applyGravity(android.widget.TextView textView,
int gravity)
protected void applyBackgroundColor(android.widget.TextView textView,
int color)
protected void applyBackgroundDrawable(android.widget.TextView textView,
android.graphics.drawable.Drawable bg)
protected void applyTextAppearance(android.widget.TextView textView,
int styleAppearance)