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