Stay organized with collections
Save and categorize content based on your preferences.
open class PasswordTransformationMethod : TextWatcher, TransformationMethod
Summary
Public constructors
PasswordTransformationMethod()
Public methods
afterTextChanged
open fun afterTextChanged(s: Editable!): Unit
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# PasswordTransformationMethod\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nPasswordTransformationMethod\n============================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/text/method/PasswordTransformationMethod \"View this page in Java\") \n\n```\nopen class PasswordTransformationMethod : TextWatcher, TransformationMethod\n```\n\n|---|-------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.text.method.PasswordTransformationMethod](#) |\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------------------------|---|\n| [PasswordTransformationMethod](#PasswordTransformationMethod())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [afterTextChanged](#afterTextChanged(android.text.Editable))`(`s:` `[Editable](../Editable.html#)!`)` \u003cbr /\u003e |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [beforeTextChanged](#beforeTextChanged(kotlin.CharSequence,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`s:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`, `start:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `after:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` \u003cbr /\u003e |\n| open static [PasswordTransformationMethod](#)! | [getInstance](#getInstance())`()` \u003cbr /\u003e |\n| open [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)! | [getTransformation](#getTransformation(kotlin.CharSequence,%20android.view.View))`(`source:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`, `view:` `[View](../../view/View.html#)!`)` \u003cbr /\u003e |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onFocusChanged](#onFocusChanged(android.view.View,%20kotlin.CharSequence,%20kotlin.Boolean,%20kotlin.Int,%20android.graphics.Rect))`(`view:` `[View](../../view/View.html#)!`, `sourceText:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`, `focused:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `direction:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `previouslyFocusedRect:` `[Rect](../../graphics/Rect.html#)!`)` \u003cbr /\u003e |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onTextChanged](#onTextChanged(kotlin.CharSequence,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`s:` `[CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)!`, `start:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `before:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `count:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### PasswordTransformationMethod\n\n```\nPasswordTransformationMethod()\n```\n\nPublic methods\n--------------\n\n### afterTextChanged\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun afterTextChanged(s: Editable!): Unit\n``` \n\n### beforeTextChanged\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun beforeTextChanged(\n s: CharSequence!, \n start: Int, \n count: Int, \n after: Int\n): Unit\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(): PasswordTransformationMethod!\n``` \n\n### getTransformation\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getTransformation(\n source: CharSequence!, \n view: View!\n): CharSequence!\n``` \n\n### onFocusChanged\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onFocusChanged(\n view: View!, \n sourceText: CharSequence!, \n focused: Boolean, \n direction: Int, \n previouslyFocusedRect: Rect!\n): Unit\n``` \n\n### onTextChanged\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onTextChanged(\n s: CharSequence!, \n start: Int, \n before: Int, \n count: Int\n): Unit\n```"]]