Notification Builder
Defined in package com.scandit.datacapture.core.ui.notification
- NotificationBuilder
class NotificationBuilderAdded in version 7.5.0
Use this object to construct instances of NotificationConfiguration.
- NotificationBuilder()
NotificationBuilder(text: String, tag: String)
Added in version 7.5.0
Constructs a new notification builder. Text is the message that will be displayed in the notification. Tag is a string used to identify the notification.
- withIcon(icon)
fun withIcon(icon: ScanditIcon): NotificationBuilder
Added in version 7.5.0
Sets the icon that will be displayed in the notification.
- withTextColor(textColor)
fun withTextColor(textColor:
Int): NotificationBuilderAdded in version 7.5.0
Sets the text color of the notification.
- withBackgroundColor(backgroundColor)
fun withBackgroundColor(backgroundColor:
Int): NotificationBuilderAdded in version 7.5.0
Sets the background color of the notification.
- withSwipeToDismiss(swipeToDismiss)
fun withSwipeToDismiss(swipeToDismiss:
Boolean): NotificationBuilderAdded in version 7.5.0
Sets whether the notification can be dismissed by swiping.
- withNotificationStyle(notificationStyle)
fun withNotificationStyle(notificationStyle: NotificationStyle): NotificationBuilder
Added in version 7.5.0
Sets the style of the notification. This will override other settings like text color and background color.
- build()
fun build(): NotificationConfiguration
Added in version 7.5.0
Builds a NotificationConfiguration object. Can be presented using the NotificationPresenter.