Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

SearchBar

open class SearchBar : RelativeLayout
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.RelativeLayout
   ↳ androidx.leanback.widget.SearchBar

A search widget containing a search orb and a text entry view.

Note: When SpeechRecognitionCallback is not used, i.e. using SpeechRecognizer, your application will need to declare android.permission.RECORD_AUDIO in manifest file. If your application target >= 23 and the device is running >= 23, it needs implement SearchBarPermissionListener where requests runtime permission.

Summary

Nested classes
abstract

Interface for receiving notification of search query changes.

abstract

Interface that handles runtime permissions requests.

Public constructors
<init>(context: Context!)

<init>(context: Context!, attrs: AttributeSet!)

<init>(context: Context!, attrs: AttributeSet!, defStyle: Int)

Public methods
open Unit

Updates the completion list shown by the IME

open Unit

Updates the completion list shown by the IME

open Drawable!

Returns the badge drawable

open CharSequence!

Returns the current search bar hint text.

open String!

Returns the current title

open Boolean

Returns true if is not running Recognizer, false otherwise.

open Unit

Sets the badge drawable showing inside the search bar.

open Unit

open Unit

Sets listener that handles runtime permission requests.

open Unit

Sets background color of not-listening state search orb.

open Unit

Sets background color of listening state search orb.

open Unit

Sets a listener for when the term search changes

open Unit

Sets the search query

open Unit

Sets the speech recognition callback.

open Unit

Sets the speech recognizer to be used when doing voice search.

open Unit
setTitle(title: String!)

Sets the title text used in the hint shown in the search bar.

open Unit

open Unit

Stops the speech recognition, if already started.

Protected methods
open Unit

open Unit

open Unit

Public constructors

<init>

SearchBar(context: Context!)

<init>

SearchBar(
    context: Context!,
    attrs: AttributeSet!)