# PreferenceFragment.OnPreferenceStartFragmentCallback

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:preference-v7:28.0.0-alpha1  
Summary:[Methods](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback#pubmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback#)  

# PreferenceFragment.OnPreferenceStartFragmentCallback

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static


interface
PreferenceFragment.OnPreferenceStartFragmentCallback
`  
`


`

|-------------------------------------------------------------------------------------|
| android.support.v14.preference.PreferenceFragment.OnPreferenceStartFragmentCallback |

|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback#)Known Indirect Subclasses [LeanbackSettingsFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment) |-----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [LeanbackSettingsFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackSettingsFragment) | This fragment provides a container for displaying a[LeanbackPreferenceFragment](https://developer.android.com/reference/android/support/v17/preference/LeanbackPreferenceFragment) The following sample code shows a simple leanback preference fragment that is populated from a resource. | ||

<br />

*** ** * ** ***

Interface that PreferenceFragment'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/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback#onPreferenceStartFragment(android.support.v14.preference.PreferenceFragment, android.support.v7.preference.Preference))`(`[PreferenceFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment)` caller, `[Preference](https://developer.android.com/reference/android/support/v7/preference/Preference)` pref) ` Called when the user has clicked on a Preference that has a fragment class name associated with it. |

## Public methods

### onPreferenceStartFragment

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean onPreferenceStartFragment (PreferenceFragment caller, 
                Preference pref)
```

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.

<br />

|                                 Parameters                                 ||
|----------|------------------------------------------------------------------|
| `caller` | `PreferenceFragment`: The fragment requesting navigation. <br /> |
| `pref`   | `Preference`: The preference requesting the fragment. <br />     |

|                             Returns                              ||
|-----------|-------------------------------------------------------|
| `boolean` | true if the fragment creation has been handled <br /> |

-

  ## Interfaces

  - [PreferenceFragment.OnPreferenceDisplayDialogCallback](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceDisplayDialogCallback)
  - [PreferenceFragment.OnPreferenceStartFragmentCallback](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartFragmentCallback)
  - [PreferenceFragment.OnPreferenceStartScreenCallback](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment.OnPreferenceStartScreenCallback)
-

  ## Classes

  - [EditTextPreferenceDialogFragment](https://developer.android.com/reference/android/support/v14/preference/EditTextPreferenceDialogFragment)
  - [ListPreferenceDialogFragment](https://developer.android.com/reference/android/support/v14/preference/ListPreferenceDialogFragment)
  - [MultiSelectListPreference](https://developer.android.com/reference/android/support/v14/preference/MultiSelectListPreference)
  - [MultiSelectListPreferenceDialogFragment](https://developer.android.com/reference/android/support/v14/preference/MultiSelectListPreferenceDialogFragment)
  - [PreferenceDialogFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceDialogFragment)
  - [PreferenceFragment](https://developer.android.com/reference/android/support/v14/preference/PreferenceFragment)
  - [R](https://developer.android.com/reference/android/support/v14/preference/R)
  - [R.anim](https://developer.android.com/reference/android/support/v14/preference/R.anim)
  - [R.attr](https://developer.android.com/reference/android/support/v14/preference/R.attr)
  - [R.bool](https://developer.android.com/reference/android/support/v14/preference/R.bool)
  - [R.color](https://developer.android.com/reference/android/support/v14/preference/R.color)
  - [R.dimen](https://developer.android.com/reference/android/support/v14/preference/R.dimen)
  - [R.drawable](https://developer.android.com/reference/android/support/v14/preference/R.drawable)
  - [R.id](https://developer.android.com/reference/android/support/v14/preference/R.id)
  - [R.integer](https://developer.android.com/reference/android/support/v14/preference/R.integer)
  - [R.layout](https://developer.android.com/reference/android/support/v14/preference/R.layout)
  - [R.string](https://developer.android.com/reference/android/support/v14/preference/R.string)
  - [R.style](https://developer.android.com/reference/android/support/v14/preference/R.style)
  - [R.styleable](https://developer.android.com/reference/android/support/v14/preference/R.styleable)
  - [SwitchPreference](https://developer.android.com/reference/android/support/v14/preference/SwitchPreference)