SuggestAppBarItemModel

open class SuggestAppBarItemModel<T : SuggestAppBarItemView> @JvmOverloads 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) : SuggestAppBarModel<T>

A model class extending SuggestAppBarModel that manages the data and behavior of a SuggestAppBarItemView or its subclass, typically used as an individual item or page within a suggestion ViewPager.

Use the Builder class to construct instances of SuggestAppBarItemModel.

Parameters

T

The type of SuggestAppBarItemView associated with this model.

kclazz

The Kotlin class (KClass) of the view.

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 SuggestAppBarItemModel.

Functions

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

Initializes the given AppBarView.