In-App UI
Android (Kotlin)
UI components
Customization
Customizing Knock UI components in Android
How to customize Knock's Android UI components.
InAppFeedTheme
Overview
InAppFeedTheme
allows for UI customization of the InAppFeedView
.
Properties
rowThemeFeedNotificationRowTheme
Defines the UI customization of the row items.filterTabThemeFilterTabTheme
Defines the UI customization of the top filter tabs.titleStringString?
Sets the title of the view. If set to nil, then the title view will be hidden entirely. This is useful if you want to have a completely custom title view.textStyleTextStyle?
Sets the textStyle for the title of the view.upperBackgroundColorColor?
Sets the background color of the top portion of the view (title view, filter view, and top action buttons view).lowerBackgroundColorColor?
Sets the background color of the bottom portion of the view (the list).FeedNotificationRowTheme
Overview
FeedNotificationRowTheme
allows for UI customization of the row items in the KnockInAppFeedView
.
Properties
backgroundColorColor
Background color of the FeedNotificationRow.bodyTextStyleTextStyle?
Set the textStyle of the body of the message.unreadNotificationCircleColorColor
Color of the unread circle indicator in the top left of the row.showAvatarViewBool
Show or hide the avatar/initials view in the upper left corner of the row.avatarViewThemeAvatarViewTheme
Customize styling of avatarview.primaryActionButtonConfigActionButtonConfig
Styling for primary action buttons.secondaryActionButtonConfigActionButtonConfig
Styling for secondary action buttons.sentAtDateFormatterDateTimeFormatter
DateTimeFormatter for the sent timestamp at the bottom of the row.sentAtDateTextStyleTextStyle
TextStyle for sent timestamp.markAsReadSwipeConfigSwipeConfig?
This is the config to set the mark as read/unread swipe actions. Set to null to remove the action entirely.archiveSwipeConfigSwipeConfig?
This is the config to set the archive/unarchive swipe actions. Set to null to remove the action entirely.AvatarViewTheme
Overview
AvatarViewTheme
allows for UI customization of the user avatar view in the row item.
Properties
avatarViewBackgroundColorColor?
Background color of the view. This is more apparent when the view is showing initials instead of an image.avatarViewInitialsTextStyleTextStyle?
TextStyle for the initials view.avatarViewSizeCGFloat
Overall size of the avatar view.FilterTabTheme
Overview
FilterTabTheme
allows for UI customization of the filter tab bar at the top of the view.
Properties
selectedColorColor?
The color the tab will be in the selected stateunselectedColorColor?
The color the tab will be in the unselected state.textStyleTextStyle
The TextStyle of the filter tab text.EmptyFeedViewTheme
Overview
EmptyFeedViewTheme
allows for UI customization of the EmptyFeedView for each filter.
Properties
backgroundColorColor?
The background color of the view.titleString?
The title of the EmptyFeedView.titleTextStyleTextStyle
The TextStyle of the title.subtitleTextStyle
The subtitle of the EmptyFeedView.subtitleTextStyleTextStyle
The TextStyle of the subtitle.iconImageVector?
The TextStyle of the filter tab text.iconResIdInt?
The TextStyle of the filter tab text.iconSizeInt?
The TextStyle of the filter tab text.iconColorColor?
The TextStyle of the filter tab text.FilterTabTheme
Overview
FilterTabTheme
allows for UI customization of the filter tab bar at the top of the view.
Properties
selectedColorColor?
The color the tab will be in the selected stateunselectedColorColor?
The color the tab will be in the unselected state.textStyleTextStyle
The TextStyle of the filter tab text.SwipeConfig
Overview
SwipeConfig
allows for UI customization of the left and right swipe actions of the FeedNotificationRow.
Properties
actionFeedNotificationRowSwipeAction?
The action you want taken on the swipetitleString?
The title of the swipe action (e.g. `Read`).inverseTitleString?
The inverse title of the swipe action (e.g. `Unread`).titleStyleTextStyle?
The textStyle of the title.imageIdInt?
The image resource.inverseImageIdInt?
The inverse image resource.imageSizeInt?
The size of the image.imageColorColor?
The color of the image.swipeColorColor?
The background color of the swipe action.