SuggestAppBarModel

open class SuggestAppBarModel<T : SuggestAppBarView> @JvmOverloads constructor(kclazz: KClass<T>, context: Context, val title: String? = null, val titleMaxLine: Int = 0, val subTitle: String? = null, val subTitleMaxLine: Int = 0, val imageDrawable: Drawable? = null, val closeClickListener: AppBarModel.OnClickListener? = null, val buttonListModel: ButtonListModel) : AppBarModel<T>

A model class extending AppBarModel that manages the data and behavior of a SuggestAppBarView or its subclasses, designed to display suggestion or action content.

This class handles setting the main title, subtitle, image icon/drawable, action buttons, and click listeners for both the close button and action buttons within a suggestion app bar card.

Use the Builder class to construct instances of SuggestAppBarModel.

Parameters

T

The type of SuggestAppBarView associated with this model.

kclazz

The Kotlin class (KClass) of the SuggestAppBarView implementation.

context

The context used to access resources and layout inflaters.

title

The primary title text to be displayed. Can be null.

titleMaxLine

Maximum number of lines for the primary title. Defaults to 0.

subTitle

The subtitle text to be displayed beneath the title. Can be null.

subTitleMaxLine

Maximum number of lines for the subtitle. Defaults to 0.

imageDrawable

Optional icon or image drawable displayed alongside the text content. Can be null.

closeClickListener

The click listener invoked when the close/dismiss button is clicked. Can be null.

buttonListModel

The ButtonListModel containing action button models and styling information.

See also

Inheritors

Constructors

Link copied to clipboard
constructor(kclazz: KClass<T>, context: Context, title: String? = null, titleMaxLine: Int = 0, subTitle: String? = null, subTitleMaxLine: Int = 0, imageDrawable: Drawable? = null, closeClickListener: AppBarModel.OnClickListener? = null, buttonListModel: ButtonListModel)

Types

Link copied to clipboard
class Builder(context: Context)

Builder class for constructing instances of SuggestAppBarModel.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val imageDrawable: Drawable? = null
Link copied to clipboard
val subTitle: String? = null
Link copied to clipboard
Link copied to clipboard
val title: String? = null
Link copied to clipboard
val titleMaxLine: Int = 0

Functions

Link copied to clipboard
open override fun init(moduleView: T): T

Initializes the given AppBarView.