# Editable.Factory

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Factory

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/text/Editable.Factory "View this page in Java")  

```
open class Factory
```

|---|----------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                 ||
| ↳ | [android.text.Editable.Factory](https://developer.android.com/reference/kotlin/android/text/Editable.Factory#) |

Factory used by TextView to create new[Editables](https://developer.android.com/reference/kotlin/android/text/Editable). You can subclass it to provide something other than[SpannableStringBuilder](https://developer.android.com/reference/kotlin/android/text/SpannableStringBuilder).

## Summary

|                                               Public constructors                                               ||
|--------------------------------------------------------------------------------------------------------------|---|
| [Factory](https://developer.android.com/reference/kotlin/android/text/Editable.Factory#Factory())`()` <br /> |

|                                                                                                                                                                                                         Public methods                                                                                                                                                                                                         ||
|--------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| openstatic[Editable.Factory](https://developer.android.com/reference/kotlin/android/text/Editable.Factory#)! | [getInstance](https://developer.android.com/reference/kotlin/android/text/Editable.Factory#getInstance())`()` Returns the standard Editable Factory.                                                                                                                                                             |
| open[Editable](https://developer.android.com/reference/kotlin/android/text/Editable)!                        | [newEditable](https://developer.android.com/reference/kotlin/android/text/Editable.Factory#newEditable(kotlin.CharSequence))`(`source:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`)` Returns a new SpannableStringBuilder from the specified CharSequence. |

## Public constructors

### Factory

```
Factory()
```

## Public methods

### getInstance

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open static fun getInstance(): Editable.Factory!
```

Returns the standard Editable Factory.  

### newEditable

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun newEditable(source: CharSequence!): Editable!
```

Returns a new SpannableStringBuilder from the specified CharSequence. You can override this to provide a different kind of Spanned.