public class AwesomeTextView extends TextView implements BootstrapTextView, BootstrapBrandView
Modifier and Type | Class and Description |
---|---|
static class |
AwesomeTextView.AnimationSpeed |
KEY
KEY
Constructor and Description |
---|
AwesomeTextView(Context context) |
AwesomeTextView(Context context,
AttributeSet attrs) |
AwesomeTextView(Context context,
AttributeSet attrs,
int defStyle) |
Modifier and Type | Method and Description |
---|---|
BootstrapBrand |
getBootstrapBrand() |
BootstrapText |
getBootstrapText() |
void |
onRestoreInstanceState(Parcelable state) |
Parcelable |
onSaveInstanceState() |
void |
setBootstrapBrand(BootstrapBrand bootstrapBrand)
Changes the color of the view to match the given Bootstrap Brand
|
void |
setBootstrapText(BootstrapText bootstrapText)
Sets the view to display the given BootstrapText
|
void |
setFontAwesomeIcon(java.lang.CharSequence iconCode)
Sets the text to display a FontIcon, replacing whatever text is already present.
|
void |
setIcon(java.lang.CharSequence iconCode,
IconSet iconSet)
Sets the text to display a FontIcon, replacing whatever text is already present.
|
void |
setMarkdownText(java.lang.String text)
Sets the view to display the given markdown text, by constructing a BootstrapText.
|
void |
setText(java.lang.CharSequence text,
BufferType type) |
void |
setTypicon(java.lang.CharSequence iconCode)
Sets the text to display a FontIcon, replacing whatever text is already present.
|
void |
startFlashing(boolean forever,
AwesomeTextView.AnimationSpeed speed)
Starts a Flashing Animation on the AwesomeTextView
|
void |
startRotate(boolean clockwise,
AwesomeTextView.AnimationSpeed speed)
Starts a rotating animation on the AwesomeTextView
|
protected void |
updateBootstrapState() |
public AwesomeTextView(Context context)
public AwesomeTextView(Context context, AttributeSet attrs)
public AwesomeTextView(Context context, AttributeSet attrs, int defStyle)
public Parcelable onSaveInstanceState()
public void onRestoreInstanceState(Parcelable state)
public void startFlashing(boolean forever, AwesomeTextView.AnimationSpeed speed)
forever
- whether the animation should be infinite or play oncespeed
- how fast the item should flashpublic void startRotate(boolean clockwise, AwesomeTextView.AnimationSpeed speed)
clockwise
- true for clockwise, false for anti clockwise spinningspeed
- how fast the item should rotatepublic void setIcon(java.lang.CharSequence iconCode, IconSet iconSet)
iconSet
- - An implementation of FontIconpublic void setFontAwesomeIcon(java.lang.CharSequence iconCode)
iconCode
- the fontawesome icon code e.g. "fa_play"public void setTypicon(java.lang.CharSequence iconCode)
iconCode
- the typicon icon code e.g. "ty_adjust_brightness"public void setMarkdownText(java.lang.String text)
BootstrapTextView
setMarkdownText
in interface BootstrapTextView
text
- the markdown textprotected void updateBootstrapState()
public void setBootstrapText(BootstrapText bootstrapText)
BootstrapTextView
setBootstrapText
in interface BootstrapTextView
bootstrapText
- the BootstrapText@Nullable public BootstrapText getBootstrapText()
getBootstrapText
in interface BootstrapTextView
public void setBootstrapBrand(@NonNull BootstrapBrand bootstrapBrand)
BootstrapBrandView
setBootstrapBrand
in interface BootstrapBrandView
bootstrapBrand
- the Bootstrap Brand@NonNull public BootstrapBrand getBootstrapBrand()
getBootstrapBrand
in interface BootstrapBrandView
public void setText(java.lang.CharSequence text, BufferType type)