# EditTextPreference.OnBindEditTextListener

Artifact: [androidx.preference:preference](https://developer.android.com/jetpack/androidx/releases/preference) [View Source](https://cs.android.com/search?q=file:androidx/preference/EditTextPreference.java+class:androidx.preference.EditTextPreference.OnBindEditTextListener) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/preference#1.1.0)

*** ** * ** ***


```
public interface EditTextPreference.OnBindEditTextListener
```

<br />

*** ** * ** ***

Interface definition for a callback to be invoked when the corresponding dialog view for this preference is bound. This allows you to customize the `https://developer.android.com/reference/android/widget/EditText.html` displayed in the dialog, such as setting a max length or a specific input type.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/preference/EditTextPreference.OnBindEditTextListener#onBindEditText(android.widget.EditText)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/widget/EditText.html editText)` Called when the dialog view for this preference has been bound, allowing you to customize the `https://developer.android.com/reference/android/widget/EditText.html` displayed in the dialog. |

## Public methods

### onBindEditText

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/preference#1.1.0)

```
abstract void onBindEditText(@NonNull EditText editText)
```

Called when the dialog view for this preference has been bound, allowing you to customize the `https://developer.android.com/reference/android/widget/EditText.html` displayed in the dialog.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/widget/EditText.html editText` | The `https://developer.android.com/reference/android/widget/EditText.html` displayed in the dialog |