SuggestAppBarView

@RequiresApi(value = 23)
open class SuggestAppBarView @JvmOverloads constructor(@NotNull context: Context, @Nullable attrs: AttributeSet? = null) : AppBarView

Base view class for displaying a single suggestion or action page within an expanded AppBar.

This class extends AppBarView and is responsible for inflating and managing its own layout, including adapting its appearance (such as colors and drawables) based on the current theme (light or dark).

The view is composed of the following configurable components:

The data and behavior for this view are provided by an associated SuggestAppBarModel (or subclass), which is set via setModel.

Parameters

context

The context in which the view is running, providing access to resources, themes, etc.

attrs

The attribute set from XML used to inflate the view, or null if created programmatically.

See also

Inheritors

Constructors

Link copied to clipboard
constructor(@NotNull context: Context, @Nullable attrs: AttributeSet? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Retrieves the list of buttons currently displayed in this view. This list contains Button instances that were generated based on the ButtonListModel provided via setButtonModules.

Link copied to clipboard
open override fun inflate()

Inflates the layout using the sesl_app_bar_suggest.xml resource and adds it as a child view.

Link copied to clipboard
fun setButtonModules(buttonListModel: ButtonListModel)

Configures and displays a list of buttons in the bottom layout of this view. This method clears any existing buttons, then generates and adds new buttons based on the provided ButtonListModel. The appearance of the buttons (style, max width) is dynamically adjusted based on the current theme (light/dark) and the number of buttons.

Link copied to clipboard

Sets a click listener for the close button. If the listener is null, the close button will be hidden. Otherwise, it will be visible. When the close button is clicked, the provided listener's onClick method will be invoked.

Link copied to clipboard

Sets the data model for this view. The model contains the data and logic that this view will display and interact with.

Link copied to clipboard
fun setTitle(title: String?): TextView?

Sets the title text to be shown in the title area. If the title is null or empty, the title view will be hidden.

Link copied to clipboard
open override fun updateResource(@NotNull context: Context)