# SearchFragment

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

*** ** * ** ***


```
class SearchFragment : Fragment
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html) ||
|   | ↳ | [androidx.leanback.app.SearchFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> use `https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchSupportFragment`

A fragment to handle searches. An application will supply an implementation of the `https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment.SearchResultProvider` interface to handle the search and return an `https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter` containing the results. The results are rendered into a `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsFragment`, in the same way that they are in a `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseFragment`.

A SpeechRecognizer object will be created for which your application will need to declare android.permission.RECORD_AUDIO in AndroidManifest file. If app's target version is \>= 23 and the device version is \>= 23, a permission dialog will show first time using speech recognition. 0 will be used as requestCode in requestPermissions() call. `https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSpeechRecognitionCallback(androidx.leanback.widget.SpeechRecognitionCallback)` is deprecated.

Speech recognition is automatically started when fragment is created, but not when fragment is restored from an instance state. Activity may manually call `https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#startRecognition()`, typically in onNewIntent().

## Summary

| ### Nested types |
|---|
| `interface https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment.SearchResultProvider` **This interface is deprecated.** Deprecated in Java |

| ### Public constructors |
|---|
| `[SearchFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#SearchFragment())()` **This function is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `java-static https://developer.android.com/reference/android/os/Bundle.html!` | `[createArgs](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#createArgs(android.os.Bundle,java.lang.String))(args: https://developer.android.com/reference/android/os/Bundle.html!, query: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` **This function is deprecated.** Deprecated in Java |
| `java-static https://developer.android.com/reference/android/os/Bundle.html!` | `[createArgs](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#createArgs(android.os.Bundle,java.lang.String,java.lang.String))(args: https://developer.android.com/reference/android/os/Bundle.html!, query: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[displayCompletions](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#displayCompletions(android.view.inputmethod.CompletionInfo[]))(completions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/android/view/inputmethod/CompletionInfo.html!>!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[displayCompletions](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#displayCompletions(java.util.List<java.lang.String>))(completions: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!)` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` | `[getBadgeDrawable](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#getBadgeDrawable())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/android/content/Intent.html!` | `[getRecognizerIntent](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#getRecognizerIntent())()` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsFragment!` | `[getRowsFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#getRowsFragment())()` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `[getTitle](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#getTitle())()` **This function is deprecated.** Deprecated in Java |
| `java-static https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment!` | `[newInstance](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#newInstance(java.lang.String))(query: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onCreate](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onCreate(android.os.Bundle))(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!)` **This function is deprecated.** |
| `https://developer.android.com/reference/android/view/View.html?` | `[onCreateView](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))( inflater: https://developer.android.com/reference/android/view/LayoutInflater.html!, container: https://developer.android.com/reference/android/view/ViewGroup.html?, savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html! )` **This function is deprecated.** |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onDestroy](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onDestroy())()` **This function is deprecated.** |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onDestroyView](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onDestroyView())()` **This function is deprecated.** |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onPause](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onPause())()` **This function is deprecated.** |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onRequestPermissionsResult](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onRequestPermissionsResult(int,java.lang.String[],int[]))( requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, permissions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!, grantResults: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>! )` **This function is deprecated.** |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onResume](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onResume())()` **This function is deprecated.** |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[onStart](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onStart())()` **This function is deprecated.** |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setBadgeDrawable](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setBadgeDrawable(android.graphics.drawable.Drawable))(drawable: https://developer.android.com/reference/android/graphics/drawable/Drawable.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setOnItemViewClickedListener](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setOnItemViewClickedListener(androidx.leanback.widget.OnItemViewClickedListener))(listener: https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnItemViewClickedListener!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setOnItemViewSelectedListener](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setOnItemViewSelectedListener(androidx.leanback.widget.OnItemViewSelectedListener))(listener: https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnItemViewSelectedListener!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setSearchAffordanceColors](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchAffordanceColors(androidx.leanback.widget.SearchOrbView.Colors))(colors: https://developer.android.com/reference/kotlin/androidx/leanback/widget/SearchOrbView.Colors!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setSearchAffordanceColorsInListening](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchAffordanceColorsInListening(androidx.leanback.widget.SearchOrbView.Colors))(colors: https://developer.android.com/reference/kotlin/androidx/leanback/widget/SearchOrbView.Colors!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setSearchQuery](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchQuery(android.content.Intent,boolean))(intent: https://developer.android.com/reference/android/content/Intent.html!, submit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setSearchQuery](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchQuery(java.lang.String,boolean))(query: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, submit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setSearchResultProvider](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchResultProvider(androidx.leanback.app.SearchFragment.SearchResultProvider))( searchResultProvider: https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment.SearchResultProvider! )` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setSpeechRecognitionCallback](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSpeechRecognitionCallback(androidx.leanback.widget.SpeechRecognitionCallback))(callback: https://developer.android.com/reference/kotlin/androidx/leanback/widget/SpeechRecognitionCallback!)` **This function is deprecated.** Launching voice recognition activity is no longer supported. <br /> |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[setTitle](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setTitle(java.lang.String))(title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` **This function is deprecated.** Deprecated in Java |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[startRecognition](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#startRecognition())()` **This function is deprecated.** Deprecated in Java |

### Inherited Constants

From [android.content.ComponentCallbacks2](https://developer.android.com/reference/android/content/ComponentCallbacks2.html) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_BACKGROUND = 40`

**This property is deprecated.** Deprecated in Java
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_COMPLETE = 80`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_MODERATE = 60`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_CRITICAL = 15`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_LOW = 10`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_MODERATE = 5`

**This property is deprecated.**
`const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_UI_HIDDEN = 20`

**This property is deprecated.** Deprecated in Java

### Inherited functions

From [android.app.Fragment](https://developer.android.com/reference/android/app/Fragment.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[dump](https://developer.android.com/reference/android/app/Fragment.html#dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]))(
prefix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!,
fd: https://developer.android.com/reference/java/io/FileDescriptor.html!,
writer: https://developer.android.com/reference/java/io/PrintWriter.html!,
args: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!
)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[equals](https://developer.android.com/reference/android/app/Fragment.html#equals(java.lang.Object))(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)`

**This function is deprecated.**
`https://developer.android.com/reference/android/app/Activity.html!` `[getActivity](https://developer.android.com/reference/android/app/Fragment.html#getActivity())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getAllowEnterTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#getAllowEnterTransitionOverlap())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getAllowReturnTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#getAllowReturnTransitionOverlap())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/os/Bundle.html!` `[getArguments](https://developer.android.com/reference/android/app/Fragment.html#getArguments())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/app/FragmentManager.html!` `[getChildFragmentManager](https://developer.android.com/reference/android/app/Fragment.html#getChildFragmentManager())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/content/Context.html!` `[getContext](https://developer.android.com/reference/android/app/Fragment.html#getContext())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html!` `[getEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#getEnterTransition())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html!` `[getExitTransition](https://developer.android.com/reference/android/app/Fragment.html#getExitTransition())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/app/FragmentManager.html!` `[getFragmentManager](https://developer.android.com/reference/android/app/Fragment.html#getFragmentManager())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` `[getHost](https://developer.android.com/reference/android/app/Fragment.html#getHost())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[getId](https://developer.android.com/reference/android/app/Fragment.html#getId())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/view/LayoutInflater.html!` `[getLayoutInflater](https://developer.android.com/reference/android/app/Fragment.html#getLayoutInflater())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/app/LoaderManager.html!` `[getLoaderManager](https://developer.android.com/reference/android/app/Fragment.html#getLoaderManager())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/app/Fragment.html!` `[getParentFragment](https://developer.android.com/reference/android/app/Fragment.html#getParentFragment())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html!` `[getReenterTransition](https://developer.android.com/reference/android/app/Fragment.html#getReenterTransition())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/content/res/Resources.html!` `[getResources](https://developer.android.com/reference/android/app/Fragment.html#getResources())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getRetainInstance](https://developer.android.com/reference/android/app/Fragment.html#getRetainInstance())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html!` `[getReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#getReturnTransition())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html!` `[getSharedElementEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#getSharedElementEnterTransition())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/transition/Transition.html!` `[getSharedElementReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#getSharedElementReturnTransition())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `[getString](https://developer.android.com/reference/android/app/Fragment.html#getString(int))(resId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `[getTag](https://developer.android.com/reference/android/app/Fragment.html#getTag())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/app/Fragment.html!` `[getTargetFragment](https://developer.android.com/reference/android/app/Fragment.html#getTargetFragment())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[getTargetRequestCode](https://developer.android.com/reference/android/app/Fragment.html#getTargetRequestCode())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html!` `[getText](https://developer.android.com/reference/android/app/Fragment.html#getText(int))(resId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[getUserVisibleHint](https://developer.android.com/reference/android/app/Fragment.html#getUserVisibleHint())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/view/View.html!` `[getView](https://developer.android.com/reference/android/app/Fragment.html#getView())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `[hashCode](https://developer.android.com/reference/android/app/Fragment.html#hashCode())()`

**This function is deprecated.**
`java-static https://developer.android.com/reference/android/app/Fragment.html!` `[instantiate](https://developer.android.com/reference/android/app/Fragment.html#instantiate(android.content.Context, java.lang.String))(context: https://developer.android.com/reference/android/content/Context.html!, fname: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isAdded](https://developer.android.com/reference/android/app/Fragment.html#isAdded())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isDetached](https://developer.android.com/reference/android/app/Fragment.html#isDetached())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isHidden](https://developer.android.com/reference/android/app/Fragment.html#isHidden())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isInLayout](https://developer.android.com/reference/android/app/Fragment.html#isInLayout())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isRemoving](https://developer.android.com/reference/android/app/Fragment.html#isRemoving())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isResumed](https://developer.android.com/reference/android/app/Fragment.html#isResumed())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isStateSaved](https://developer.android.com/reference/android/app/Fragment.html#isStateSaved())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isVisible](https://developer.android.com/reference/android/app/Fragment.html#isVisible())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onActivityCreated](https://developer.android.com/reference/android/app/Fragment.html#onActivityCreated(android.os.Bundle))(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onActivityResult](https://developer.android.com/reference/android/app/Fragment.html#onActivityResult(int, int, android.content.Intent))(requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, data: https://developer.android.com/reference/android/content/Intent.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onAttach](https://developer.android.com/reference/android/app/Fragment.html#onAttach(android.app.Activity))(activity: https://developer.android.com/reference/android/app/Activity.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onAttachFragment](https://developer.android.com/reference/android/app/Fragment.html#onAttachFragment(android.app.Fragment))(childFragment: https://developer.android.com/reference/android/app/Fragment.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onConfigurationChanged](https://developer.android.com/reference/android/app/Fragment.html#onConfigurationChanged(android.content.res.Configuration))(newConfig: https://developer.android.com/reference/android/content/res/Configuration.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[onContextItemSelected](https://developer.android.com/reference/android/app/Fragment.html#onContextItemSelected(android.view.MenuItem))(item: https://developer.android.com/reference/android/view/MenuItem.html!)`

**This function is deprecated.**
`https://developer.android.com/reference/android/animation/Animator.html!` `[onCreateAnimator](https://developer.android.com/reference/android/app/Fragment.html#onCreateAnimator(int, boolean, int))(transit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, enter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, nextAnim: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onCreateContextMenu](https://developer.android.com/reference/android/app/Fragment.html#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo))(
menu: https://developer.android.com/reference/android/view/ContextMenu.html!,
v: https://developer.android.com/reference/android/view/View.html!,
menuInfo: https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.html!
)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onCreateOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#onCreateOptionsMenu(android.view.Menu, android.view.MenuInflater))(menu: https://developer.android.com/reference/android/view/Menu.html!, inflater: https://developer.android.com/reference/android/view/MenuInflater.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onDestroyOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#onDestroyOptionsMenu())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onDetach](https://developer.android.com/reference/android/app/Fragment.html#onDetach())()`

**This function is deprecated.**
`https://developer.android.com/reference/android/view/LayoutInflater.html!` `[onGetLayoutInflater](https://developer.android.com/reference/android/app/Fragment.html#onGetLayoutInflater(android.os.Bundle))(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onHiddenChanged](https://developer.android.com/reference/android/app/Fragment.html#onHiddenChanged(boolean))(hidden: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onInflate](https://developer.android.com/reference/android/app/Fragment.html#onInflate(android.app.Activity, android.util.AttributeSet, android.os.Bundle))(
activity: https://developer.android.com/reference/android/app/Activity.html!,
attrs: https://developer.android.com/reference/android/util/AttributeSet.html!,
savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!
)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onLowMemory](https://developer.android.com/reference/android/app/Fragment.html#onLowMemory())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onMultiWindowModeChanged](https://developer.android.com/reference/android/app/Fragment.html#onMultiWindowModeChanged(boolean))(isInMultiWindowMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[onOptionsItemSelected](https://developer.android.com/reference/android/app/Fragment.html#onOptionsItemSelected(android.view.MenuItem))(item: https://developer.android.com/reference/android/view/MenuItem.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onOptionsMenuClosed](https://developer.android.com/reference/android/app/Fragment.html#onOptionsMenuClosed(android.view.Menu))(menu: https://developer.android.com/reference/android/view/Menu.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onPictureInPictureModeChanged](https://developer.android.com/reference/android/app/Fragment.html#onPictureInPictureModeChanged(boolean))(isInPictureInPictureMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onPrepareOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#onPrepareOptionsMenu(android.view.Menu))(menu: https://developer.android.com/reference/android/view/Menu.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onSaveInstanceState](https://developer.android.com/reference/android/app/Fragment.html#onSaveInstanceState(android.os.Bundle))(outState: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onStop](https://developer.android.com/reference/android/app/Fragment.html#onStop())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onTrimMemory](https://developer.android.com/reference/android/app/Fragment.html#onTrimMemory(int))(level: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onViewCreated](https://developer.android.com/reference/android/app/Fragment.html#onViewCreated(android.view.View, android.os.Bundle))(view: https://developer.android.com/reference/android/view/View.html!, savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[onViewStateRestored](https://developer.android.com/reference/android/app/Fragment.html#onViewStateRestored(android.os.Bundle))(savedInstanceState: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[postponeEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#postponeEnterTransition())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[registerForContextMenu](https://developer.android.com/reference/android/app/Fragment.html#registerForContextMenu(android.view.View))(view: https://developer.android.com/reference/android/view/View.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[requestPermissions](https://developer.android.com/reference/android/app/Fragment.html#requestPermissions(java.lang.String[], int))(permissions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setAllowEnterTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#setAllowEnterTransitionOverlap(boolean))(allow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setAllowReturnTransitionOverlap](https://developer.android.com/reference/android/app/Fragment.html#setAllowReturnTransitionOverlap(boolean))(allow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setArguments](https://developer.android.com/reference/android/app/Fragment.html#setArguments(android.os.Bundle))(args: https://developer.android.com/reference/android/os/Bundle.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setEnterSharedElementCallback](https://developer.android.com/reference/android/app/Fragment.html#setEnterSharedElementCallback(android.app.SharedElementCallback))(callback: https://developer.android.com/reference/android/app/SharedElementCallback.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#setEnterTransition(android.transition.Transition))(transition: https://developer.android.com/reference/android/transition/Transition.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setExitSharedElementCallback](https://developer.android.com/reference/android/app/Fragment.html#setExitSharedElementCallback(android.app.SharedElementCallback))(callback: https://developer.android.com/reference/android/app/SharedElementCallback.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setExitTransition](https://developer.android.com/reference/android/app/Fragment.html#setExitTransition(android.transition.Transition))(transition: https://developer.android.com/reference/android/transition/Transition.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setHasOptionsMenu](https://developer.android.com/reference/android/app/Fragment.html#setHasOptionsMenu(boolean))(hasMenu: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setInitialSavedState](https://developer.android.com/reference/android/app/Fragment.html#setInitialSavedState(android.app.Fragment.SavedState))(state: https://developer.android.com/reference/android/app/Fragment.SavedState.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setMenuVisibility](https://developer.android.com/reference/android/app/Fragment.html#setMenuVisibility(boolean))(menuVisible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setReenterTransition](https://developer.android.com/reference/android/app/Fragment.html#setReenterTransition(android.transition.Transition))(transition: https://developer.android.com/reference/android/transition/Transition.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setRetainInstance](https://developer.android.com/reference/android/app/Fragment.html#setRetainInstance(boolean))(retain: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#setReturnTransition(android.transition.Transition))(transition: https://developer.android.com/reference/android/transition/Transition.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setSharedElementEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#setSharedElementEnterTransition(android.transition.Transition))(transition: https://developer.android.com/reference/android/transition/Transition.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setSharedElementReturnTransition](https://developer.android.com/reference/android/app/Fragment.html#setSharedElementReturnTransition(android.transition.Transition))(transition: https://developer.android.com/reference/android/transition/Transition.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setTargetFragment](https://developer.android.com/reference/android/app/Fragment.html#setTargetFragment(android.app.Fragment, int))(fragment: https://developer.android.com/reference/android/app/Fragment.html!, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[setUserVisibleHint](https://developer.android.com/reference/android/app/Fragment.html#setUserVisibleHint(boolean))(isVisibleToUser: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[shouldShowRequestPermissionRationale](https://developer.android.com/reference/android/app/Fragment.html#shouldShowRequestPermissionRationale(java.lang.String))(permission: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startActivity](https://developer.android.com/reference/android/app/Fragment.html#startActivity(android.content.Intent))(intent: https://developer.android.com/reference/android/content/Intent.html!)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startActivityForResult](https://developer.android.com/reference/android/app/Fragment.html#startActivityForResult(android.content.Intent, int))(intent: https://developer.android.com/reference/android/content/Intent.html!, requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startIntentSenderForResult](https://developer.android.com/reference/android/app/Fragment.html#startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle))(
intent: https://developer.android.com/reference/android/content/IntentSender.html!,
requestCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
fillInIntent: https://developer.android.com/reference/android/content/Intent.html!,
flagsMask: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
flagsValues: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
extraFlags: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
options: https://developer.android.com/reference/android/os/Bundle.html!
)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[startPostponedEnterTransition](https://developer.android.com/reference/android/app/Fragment.html#startPostponedEnterTransition())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `[toString](https://developer.android.com/reference/android/app/Fragment.html#toString())()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[unregisterForContextMenu](https://developer.android.com/reference/android/app/Fragment.html#unregisterForContextMenu(android.view.View))(view: https://developer.android.com/reference/android/view/View.html!)`

**This function is deprecated.**

## Public constructors

### SearchFragment

Added in 1.1.0 Deprecated in 1.1.0

```
[SearchFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#SearchFragment())()
```

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

## Public functions

### createArgs

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

```
java-static fun [createArgs](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#createArgs(android.os.Bundle,java.lang.String))(args: Bundle!, query: String!): Bundle!
```

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

| Parameters |
|---|---|
| `args: https://developer.android.com/reference/android/os/Bundle.html!` | Bundle to use for the arguments, if null a new Bundle will be created. |

### createArgs

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

```
java-static fun [createArgs](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#createArgs(android.os.Bundle,java.lang.String,java.lang.String))(args: Bundle!, query: String!, title: String!): Bundle!
```

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

### displayCompletions

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

```
fun [displayCompletions](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#displayCompletions(android.view.inputmethod.CompletionInfo[]))(completions: Array<CompletionInfo!>!): Unit
```

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

Displays the completions shown by the IME. An application may provide a list of query completions that the system will show in the IME.

| Parameters |
|---|---|
| `completions: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/android/view/inputmethod/CompletionInfo.html!>!` | A list of completions to show in the IME. Setting to null or empty will clear the list. |

### displayCompletions

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

```
fun [displayCompletions](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#displayCompletions(java.util.List<java.lang.String>))(completions: (Mutable)List<String!>!): Unit
```

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

Displays the completions shown by the IME. An application may provide a list of query completions that the system will show in the IME.

| Parameters |
|---|---|
| `completions: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!>!` | A list of completions to show in the IME. Setting to null or empty will clear the list. |

### getBadgeDrawable

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

```
fun [getBadgeDrawable](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#getBadgeDrawable())(): Drawable!
```

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

Returns the badge drawable in the search bar.

### getRecognizerIntent

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

```
fun [getRecognizerIntent](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#getRecognizerIntent())(): Intent!
```

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

Returns an intent that can be used to request speech recognition. Built from the base `https://developer.android.com/reference/android/speech/RecognizerIntent.html#ACTION_RECOGNIZE_SPEECH` plus extras:

- `https://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_LANGUAGE_MODEL` set to `https://developer.android.com/reference/android/speech/RecognizerIntent.html#LANGUAGE_MODEL_FREE_FORM`
- `https://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_PARTIAL_RESULTS` set to true
- `https://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_PROMPT` set to the search bar hint text

For handling the intent returned from the service, see `https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchQuery(android.content.Intent,boolean)`.

### getRowsFragment

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

```
fun [getRowsFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#getRowsFragment())(): RowsFragment!
```

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

Returns RowsFragment that shows result rows. RowsFragment is initialized after SearchFragment.onCreateView().

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsFragment!` | RowsFragment that shows result rows. |

### getTitle

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

```
fun [getTitle](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#getTitle())(): String!
```

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

Returns the title set in the search bar.

### newInstance

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

```
java-static fun [newInstance](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#newInstance(java.lang.String))(query: String!): SearchFragment!
```

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

Creates a search fragment with a given search query.

You should only use this if you need to start the search fragment with a pre-filled query.

| Parameters |
|---|---|
| `query: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The search query to begin with. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment!` | A new SearchFragment. |

### onCreate

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

```
fun [onCreate](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onCreate(android.os.Bundle))(savedInstanceState: Bundle!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   

### onCreateView

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

```
fun [onCreateView](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onCreateView(android.view.LayoutInflater,android.view.ViewGroup,android.os.Bundle))(
    inflater: LayoutInflater!,
    container: ViewGroup?,
    savedInstanceState: Bundle!
): View?
```

> [!CAUTION]
> **This function is deprecated.**   

### onDestroy

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

```
fun [onDestroy](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onDestroy())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   

### onDestroyView

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

```
fun [onDestroyView](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onDestroyView())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   

### onPause

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

```
fun [onPause](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onPause())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   

### onRequestPermissionsResult

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

```
fun [onRequestPermissionsResult](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onRequestPermissionsResult(int,java.lang.String[],int[]))(
    requestCode: Int,
    permissions: Array<String!>!,
    grantResults: IntArray<Int>!
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   

### onResume

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

```
fun [onResume](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onResume())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   

### onStart

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

```
fun [onStart](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#onStart())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   

### setBadgeDrawable

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

```
fun [setBadgeDrawable](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setBadgeDrawable(android.graphics.drawable.Drawable))(drawable: Drawable!): Unit
```

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

Sets the badge drawable that will be shown inside the search bar next to the title.

### setOnItemViewClickedListener

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

```
fun [setOnItemViewClickedListener](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setOnItemViewClickedListener(androidx.leanback.widget.OnItemViewClickedListener))(listener: OnItemViewClickedListener!): Unit
```

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

Sets an item clicked listener for the results.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnItemViewClickedListener!` | The item clicked listener to be invoked when an item in the search results is clicked. |

### setOnItemViewSelectedListener

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

```
fun [setOnItemViewSelectedListener](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setOnItemViewSelectedListener(androidx.leanback.widget.OnItemViewSelectedListener))(listener: OnItemViewSelectedListener!): Unit
```

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

Sets an item selection listener for the results.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnItemViewSelectedListener!` | The item selection listener to be invoked when an item in the search results is selected. |

### setSearchAffordanceColors

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

```
fun [setSearchAffordanceColors](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchAffordanceColors(androidx.leanback.widget.SearchOrbView.Colors))(colors: SearchOrbView.Colors!): Unit
```

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

Sets background color of not-listening state search orb.

| Parameters |
|---|---|
| `colors: https://developer.android.com/reference/kotlin/androidx/leanback/widget/SearchOrbView.Colors!` | SearchOrbView.Colors. |

### setSearchAffordanceColorsInListening

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

```
fun [setSearchAffordanceColorsInListening](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchAffordanceColorsInListening(androidx.leanback.widget.SearchOrbView.Colors))(colors: SearchOrbView.Colors!): Unit
```

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

Sets background color of listening state search orb.

| Parameters |
|---|---|
| `colors: https://developer.android.com/reference/kotlin/androidx/leanback/widget/SearchOrbView.Colors!` | SearchOrbView.Colors. |

### setSearchQuery

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

```
fun [setSearchQuery](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchQuery(android.content.Intent,boolean))(intent: Intent!, submit: Boolean): Unit
```

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

Sets the text of the search query based on the `https://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_RESULTS` in the given intent, and optionally submit the query. If more than one result is present in the results list, the first will be used.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html!` | Intent received from a speech recognition service. |
| `submit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether to submit the query. |

### setSearchQuery

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

```
fun [setSearchQuery](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchQuery(java.lang.String,boolean))(query: String!, submit: Boolean): Unit
```

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

Sets the text of the search query and optionally submits the query. Either `https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment.SearchResultProvider#onQueryTextChange(java.lang.String)` or `https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment.SearchResultProvider#onQueryTextSubmit(java.lang.String)` will be called on the provider if it is set.

| Parameters |
|---|---|
| `query: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The search query to set. |
| `submit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether to submit the query. |

### setSearchResultProvider

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

```
fun [setSearchResultProvider](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSearchResultProvider(androidx.leanback.app.SearchFragment.SearchResultProvider))(
    searchResultProvider: SearchFragment.SearchResultProvider!
): Unit
```

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

Sets the search provider that is responsible for returning results for the search query.

### setSpeechRecognitionCallback

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

```
fun [setSpeechRecognitionCallback](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setSpeechRecognitionCallback(androidx.leanback.widget.SpeechRecognitionCallback))(callback: SpeechRecognitionCallback!): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Launching voice recognition activity is no longer supported. App should declare android.permission.RECORD_AUDIO in AndroidManifest file.

Sets this callback to have the fragment pass speech recognition requests to the activity rather than using a SpeechRecognizer object.

### setTitle

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

```
fun [setTitle](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#setTitle(java.lang.String))(title: String!): Unit
```

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

Sets the title string to be be shown in an empty search bar. The title may be placed in a call-to-action, such as "Search *title* " or "Speak to search *title*".

### startRecognition

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

```
fun [startRecognition](https://developer.android.com/reference/kotlin/androidx/leanback/app/SearchFragment#startRecognition())(): Unit
```

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

Starts speech recognition. Typical use case is that activity receives onNewIntent() call when user clicks a MIC button. Note that SearchFragment automatically starts speech recognition at first time created, there is no need to call startRecognition() when fragment is created.