Stay organized with collections
Save and categorize content based on your preferences.
Factory
open class Factory
Factory used by TextView to create new Editables
. You can subclass it to provide something other than SpannableStringBuilder
.
Summary
Public methods |
open static Editable.Factory! |
Returns the standard Editable Factory.
|
open Editable! |
Returns a new SpannableStringBuilder from the specified CharSequence.
|
Public constructors
Public methods
getInstance
open static fun getInstance(): Editable.Factory!
Returns the standard Editable Factory.
newEditable
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Editable.Factory\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nFactory\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/text/Editable.Factory \"View this page in Java\") \n\n```\nopen class Factory\n```\n\n|---|------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.text.Editable.Factory](#) |\n\nFactory used by TextView to create new [Editables](/reference/kotlin/android/text/Editable). You can subclass it to provide something other than [SpannableStringBuilder](/reference/kotlin/android/text/SpannableStringBuilder).\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------|---|\n| [Factory](#Factory())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open static [Editable.Factory](#)! | [getInstance](#getInstance())`()` Returns the standard Editable Factory. |\n| open [Editable](/reference/kotlin/android/text/Editable)! | [newEditable](#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. |\n\nPublic constructors\n-------------------\n\n### Factory\n\n```\nFactory()\n```\n\nPublic methods\n--------------\n\n### getInstance\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen static fun getInstance(): Editable.Factory!\n```\n\nReturns the standard Editable Factory. \n\n### newEditable\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun newEditable(source: CharSequence!): Editable!\n```\n\nReturns a new SpannableStringBuilder from the specified CharSequence. You can override this to provide a different kind of Spanned."]]