SearchOrbView
open class SearchOrbView : FrameLayout, OnClickListener
kotlin.Any | ||||
↳ | android.view.View | |||
↳ | android.view.ViewGroup | |||
↳ | android.widget.FrameLayout | |||
↳ | androidx.leanback.widget.SearchOrbView |
A widget that draws a search affordance, represented by a round background and an icon.
The background color and icon can be customized.Summary
Nested classes | |
---|---|
open |
A set of colors used to display the search orb. |
Public constructors | |
---|---|
<init>(context: Context!, attrs: AttributeSet!) |
|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int) |
Public methods | |
---|---|
open Unit |
enableOrbColorAnimation(enable: Boolean) Enables or disables the orb color animation. |
open Int |
Returns the orb color |
open SearchOrbView.Colors! |
Returns the |
open Drawable! |
Returns the orb icon |
open Unit | |
open Unit |
setOnOrbClickedListener(listener: OnClickListener!) Sets the on click listener for the orb. |
open Unit |
setOrbColor(color: Int) Sets the background color of the search orb. |
open Unit |
setOrbColor(@ColorInt color: Int, @ColorInt brightColor: Int) Sets the search orb colors. |
open Unit |
setOrbColors(colors: SearchOrbView.Colors!) Sets the |
open Unit |
setOrbIcon(icon: Drawable!) Sets the orb icon. |
Protected methods | |
---|---|
open Unit | |
open Unit | |
open Unit |
onFocusChanged(gainFocus: Boolean, direction: Int, previouslyFocusedRect: Rect?) |
Public constructors
<init>
SearchOrbView(context: Context!)
<init>
SearchOrbView(
context: Context!,
attrs: AttributeSet!)
<init>
SearchOrbView(
context: Context!,
attrs: AttributeSet!,
defStyleAttr: Int)
Public methods
enableOrbColorAnimation
open fun enableOrbColorAnimation(enable: Boolean): Unit
Enables or disables the orb color animation.
Orb color animation is handled automatically when the orb is focused/unfocused, however, an app may choose to override the current animation state, for example when an activity is paused.
getOrbColors
open fun getOrbColors(): <