HeaderViewModel

open class HeaderViewModel(val imageDescriptor: LiveData<ImageDescriptor?> = EmptyLiveData(), val title: LiveData<StringResolver?> = EmptyLiveData(), val description: LiveData<StringResolver?> = EmptyLiveData())

A view model used to populate the header section of the notification template. The header summarizes the main contents of the notification. E.g., the image and the name of the contact of an incoming call.

A schematic overview of the header section:

 __________________________________________________________
| _______ | |
| | | | Header title |
| | Image | | Header description |
| |_______| | |
|_____________|____________________________________________|

Parameters

imageDescriptor

The information to display in the image field. When set to null, the image field will not be visible.

title

A StringResolver for the header title in the header section. When set to null, the header title text field will not be visible.

description

A StringResolver for the header description in the header section. When set to null, the header description text field will not be visible.

Constructors

Link copied to clipboard
constructor(imageDescriptor: ImageDescriptor? = null, title: StringResolver? = null, description: StringResolver? = null)

A convenience constructor for creating a HeaderViewModel with non-live data.

constructor(imageDescriptor: LiveData<ImageDescriptor?> = EmptyLiveData(), title: LiveData<StringResolver?> = EmptyLiveData(), description: LiveData<StringResolver?> = EmptyLiveData())

Properties

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