# PreferenceFragment.OnPreferenceStartFragmentCallback

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

*** ** * ** ***


```
public interface PreferenceFragment.OnPreferenceStartFragmentCallback
```

<br />

Known direct subclasses [LeanbackSettingsFragment](https://developer.android.com/reference/androidx/leanback/preference/LeanbackSettingsFragment)

|---|---|
| `https://developer.android.com/reference/androidx/leanback/preference/LeanbackSettingsFragment` | **This class is deprecated.** Use `https://developer.android.com/reference/androidx/leanback/preference/LeanbackSettingsFragmentCompat` <br /> |

*** ** * ** ***

> [!CAUTION]
> **This interface is deprecated.**   
> Deprecated in Java

Interface that the fragment's containing activity should implement to be able to process preference items that wish to switch to a specified fragment.

## Summary

| ### Public methods |
|---|---|
| `abstract boolean` | `[onPreferenceStartFragment](https://developer.android.com/reference/androidx/preference/PreferenceFragment.OnPreferenceStartFragmentCallback#onPreferenceStartFragment(androidx.preference.PreferenceFragment,androidx.preference.Preference))( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/preference/PreferenceFragment caller, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/preference/Preference pref )` **This method is deprecated.** Deprecated in Java |

## Public methods

### onPreferenceStartFragment

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

```
abstract boolean [onPreferenceStartFragment](https://developer.android.com/reference/androidx/preference/PreferenceFragment.OnPreferenceStartFragmentCallback#onPreferenceStartFragment(androidx.preference.PreferenceFragment,androidx.preference.Preference))(
    @NonNull PreferenceFragment caller,
    @NonNull Preference pref
)
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Called when the user has clicked on a Preference that has a fragment class name associated with it. The implementation should instantiate and switch to an instance of the given fragment.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/preference/PreferenceFragment caller` | The fragment requesting navigation |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/preference/Preference pref` | The preference requesting the fragment |

| Returns |
|---|---|
| `boolean` | `true` if the fragment creation has been handled |