NotificationViewModel
A ViewModel that provides the information to show within a NotificationFragment.
The notification template is divided in several sections. Each section can be populated by its own data field in this ViewModel. A section is only visible if its view model is set.
A schematic overview of the notification template:
__________________________________________________________
| _____ | |
| | | | Header title |
| | | | Header description | Header section
| |_____| | |
|___________|______________________________________________|
| |
| Body text | Body section
|__________________________________________________________|
| ___________________ | ____________________ |
| | | | | | |
| | Primary button | | | Secondary button | | Button section
| |___________________| | |____________________| |
|____________________________|_____________________________|
| __ | |
| |__| | Option 1 |
|________|_________________________________________________|
| __ | |
| |__| | Option 2 | Options section
|________|_________________________________________________|
| __ | |
| |__| | Option N |
|________|_________________________________________________|
The header section gives the user a context on the notifications appearing (e.g. someone's calling, car warning, etc.). The body section is used to provide a description of a notification. The button section provides the user the ability to act upon the notification (if applicable). The options section provides the user a set of extra options to choose from (e.g. send quick replies, multiple options given by VPA, etc.).
Parameters
The type of the panel.
The NotificationPanel of type P that hosts this NotificationViewModel.
Inheritors
Types
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 view model be used to populate one item in the options section.
Properties
The view model for the header section containing the thumbnail, title and description.
The view models for options in the options section. Each view model populates an additional item in the options section. Each item represents one option a user can choose from(e.g. send quick replies, an option given by VPA, etc.).
The view model for the primary button in the button section.
The view model for the secondary action button in the button section.