AI-generated Key Takeaways
-
Spannable.Factoryis used byTextViewto create new Spannables, offering the ability to create custom Spannable implementations. -
It provides a method
newSpannableto generate a newSpannableStringfrom a givenCharSequence, which can be overridden for custom Spannable types. -
Developers can get the standard
Spannable.Factoryinstance using the staticgetInstancemethod.
Factory used by TextView to create new Spannables. You can subclass it to provide something other than SpannableString.
Public Constructor Summary
|
Factory()
|
Public Method Summary
| static Spannable.Factory |
getInstance()
Returns the standard Spannable Factory.
|
| Spannable |
newSpannable(CharSequence source)
Returns a new SpannableString from the specified CharSequence.
|
Inherited Method Summary
Public Constructors
public Factory ()
Public Methods
public Spannable newSpannable (CharSequence source)
Returns a new SpannableString from the specified CharSequence. You can override this to provide a different kind of Spannable.
Parameters
| source |
|---|