Use the settings provided in config.xml
and integers.xml
to set up the appearance and configurations of your notifications.
Appearance
To configure the appearance of notifications, modify these settings in
config.xml
:
Purpose | Setting |
---|---|
Display the navigation as a heads-up notification (HUN). | config_showNavigationHeadsup Default: true |
Specify the background color of the notification card for the category entitled Notification.CATEGORY_NAVIGATION |
config_enableCardBackgroundColorForCategoryNavigation Default: false |
Set the background color of the card for notifications from system apps. | config_enableCardBackgroundColorForSystemApp Default: false |
Display the notification header at the top of the notifications list. | config_showHeaderForNotifications Default: false |
Display the notification footer at the bottom of notifications list. | config_showFooterForNotifications Default: true |
Change the accent color of the small icon. | config_enableSmallIconAccentColor Default: true |
Functionality
To configure how notifications function, update these settings in
integers.xml
:
Purpose | Setting |
---|---|
Set the maximum number of group members displayed when notification group is expanded. | max_group_children_number Default: 8 |
Specify the duration of HUNs in milliseconds. When this duration
elapses, HUNs are automatically dismissed until an update to an existing
HUN for which this flag is set:Notification.FLAG_ONLY_ALERT_ONCE Time is reset when an update is received and the HUN is displayed for a longer duration. Should this flag be set and an update received, the time won't be reset. |
headsup_notification_duration_ms Default: 8000 |
Set the minimum display time (in milliseconds) for a HUN. When an app cancels notification as soon as it's posted or within the configured time duration, the HUN is displayed for at least this much time. | heads_up_notification_minimum_time Default: 2000 |
Specify the total duration (in milliseconds) needed by a fly-in animation to display a HUN. | headsup_total_enter_duration_ms Default: 233 |
Set the time (in milliseconds) needed by a fly-in animation to display a HUN for alpha. During animation, the time needed for a HUN to transition from transparent to opaque. | headsup_alpha_enter_duration_ms Default: 83 |
Specify the time (in milliseconds) needed by a fly-out animation to display a heads-up notification. | headsup_exit_duration_ms Default: 150 |
Define the minimum velocity (in pixels per second) used to determine that a swipe moves in the same direction. |
min_velocity_for_swipe_direction_detection Default: 50 |