Package com.aliucord.entities
Class NotificationData
-
- All Implemented Interfaces:
public class NotificationData
Notification builder.
-
-
Field Summary
Fields Modifier and Type Field Description public CharSequence
title
public CharSequence
subtitle
public CharSequence
body
public Drawable
attachmentBackground
public String
attachmentUrl
public Drawable
attachment
public List<Sticker>
stickers
public String
iconUrl
public Integer
iconResId
public Drawable
iconTopRight
public Integer
autoDismissPeriodSecs
public List<out c<out AppComponent>>
validScreens
public Function1<out Object, Unit>
onClickTopRightIcon
public Function1<out Object, Unit>
onClick
-
Constructor Summary
Constructors Constructor Description NotificationData()
-
Method Summary
Modifier and Type Method Description CharSequence
getTitle()
NotificationData
setTitle(@Nullable() CharSequence title)
Sets the title. CharSequence
getSubtitle()
NotificationData
setSubtitle(@Nullable() CharSequence subtitle)
Sets the subtitle. CharSequence
getBody()
NotificationData
setBody(@Nullable() CharSequence body)
Sets the body. Drawable
getAttachmentBackground()
NotificationData
setAttachmentBackground(@Nullable() Drawable attachmentBackground)
Sets the background for the attachment. String
getAttachmentUrl()
NotificationData
setAttachmentUrl(@Nullable() String attachmentUrl)
Sets the attachment URL. Drawable
getAttachment()
NotificationData
setAttachment(@Nullable() Drawable attachment)
Sets the attachment. List<Sticker>
getStickers()
NotificationData
setStickers(@Nullable() List<Sticker> stickers)
Sets the stickers. String
getIconUrl()
NotificationData
setIconUrl(@NonNull() String iconUrl)
Sets the icon URL. Integer
getIconResId()
NotificationData
setIconResId(@Nullable() Integer iconResId)
Sets the icon. Drawable
getIconTopRight()
NotificationData
setIconTopRight(@Nullable() Drawable iconTopRight)
Sets the icon on the top right corner of the notification. Integer
getAutoDismissPeriodSecs()
NotificationData
setAutoDismissPeriodSecs(@Nullable() Integer autoDismissPeriodSecs)
Sets the auto dismiss period. List<out c<out AppComponent>>
getValidScreens()
NotificationData
setValidScreens(@Nullable() List<out c<out AppComponent>> validScreens)
Sets valid screens for the notification. Function1<out Object, Unit>
getOnClickTopRightIcon()
NotificationData
setOnClickTopRightIcon(@Nullable() Function1<out Object, Unit> onClickTopRightIcon)
Sets the callback for the notification top right corner icon onClick action. Function1<out Object, Unit>
getOnClick()
NotificationData
setOnClick(@Nullable() Function1<out Object, Unit> onClick)
Sets the callback for the notification onClick action. -
-
Method Detail
-
getTitle
CharSequence getTitle()
-
setTitle
NotificationData setTitle(@Nullable() CharSequence title)
Sets the title.
- Parameters:
title
- Title.
-
getSubtitle
CharSequence getSubtitle()
-
setSubtitle
NotificationData setSubtitle(@Nullable() CharSequence subtitle)
Sets the subtitle.
- Parameters:
subtitle
- Subtitle.
-
getBody
CharSequence getBody()
-
setBody
NotificationData setBody(@Nullable() CharSequence body)
Sets the body.
- Parameters:
body
- Body.
-
getAttachmentBackground
Drawable getAttachmentBackground()
-
setAttachmentBackground
NotificationData setAttachmentBackground(@Nullable() Drawable attachmentBackground)
Sets the background for the attachment.
- Parameters:
attachmentBackground
- Background Drawable of the attachment.
-
getAttachmentUrl
String getAttachmentUrl()
-
setAttachmentUrl
NotificationData setAttachmentUrl(@Nullable() String attachmentUrl)
Sets the attachment URL.
- Parameters:
attachmentUrl
- URL of the attachment.
-
getAttachment
Drawable getAttachment()
-
setAttachment
NotificationData setAttachment(@Nullable() Drawable attachment)
Sets the attachment.
- Parameters:
attachment
- Attachment Drawable.
-
getStickers
List<Sticker> getStickers()
-
setStickers
NotificationData setStickers(@Nullable() List<Sticker> stickers)
Sets the stickers.
- Parameters:
stickers
- List of stickers.
-
getIconUrl
String getIconUrl()
-
setIconUrl
NotificationData setIconUrl(@NonNull() String iconUrl)
Sets the icon URL.
- Parameters:
iconUrl
- URL of the icon.
-
getIconResId
Integer getIconResId()
-
setIconResId
NotificationData setIconResId(@Nullable() Integer iconResId)
Sets the icon.
-
getIconTopRight
Drawable getIconTopRight()
-
setIconTopRight
NotificationData setIconTopRight(@Nullable() Drawable iconTopRight)
Sets the icon on the top right corner of the notification.
- Parameters:
iconTopRight
- Drawable of the icon.
-
getAutoDismissPeriodSecs
Integer getAutoDismissPeriodSecs()
-
setAutoDismissPeriodSecs
NotificationData setAutoDismissPeriodSecs(@Nullable() Integer autoDismissPeriodSecs)
Sets the auto dismiss period.
- Parameters:
autoDismissPeriodSecs
- Dismiss period in seconds.
-
getValidScreens
List<out c<out AppComponent>> getValidScreens()
-
setValidScreens
NotificationData setValidScreens(@Nullable() List<out c<out AppComponent>> validScreens)
Sets valid screens for the notification.
- Parameters:
validScreens
- Valid screens.
-
getOnClickTopRightIcon
Function1<out Object, Unit> getOnClickTopRightIcon()
-
setOnClickTopRightIcon
NotificationData setOnClickTopRightIcon(@Nullable() Function1<out Object, Unit> onClickTopRightIcon)
Sets the callback for the notification top right corner icon onClick action.
- Parameters:
onClickTopRightIcon
- Block to execute after clicking the icon in the top right corner of the notification.
-
getOnClick
Function1<out Object, Unit> getOnClick()
-
setOnClick
NotificationData setOnClick(@Nullable() Function1<out Object, Unit> onClick)
Sets the callback for the notification onClick action.
- Parameters:
onClick
- Block to execute after clicking the notification.
-
-
-
-