AI-generated Key Takeaways
-
Spannable.Factory
is used byTextView
to create new Spannables, offering the ability to create custom Spannable implementations. -
It provides a method
newSpannable
to generate a newSpannableString
from a givenCharSequence
, which can be overridden for custom Spannable types. -
Developers can get the standard
Spannable.Factory
instance using the staticgetInstance
method.
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 |
---|