ICInAppBannerNotificationViewBinder

This class implements the ICInAppNotificationViewBinder and will represent the Banner InApp Notification

Styling

The style of the Banner can be set by configuring the appropriate style attributes within your apps styles.xml.
Internally ICInAppBannerNotificationViewBinder leverages the lower level components which utilizes the style attributes. Therefore, the style is applied to that individual components.

First, define styles which inherit from the defaults provided by the SDK and set the appropriate attributes:

<style name="ICInAppBannerNotificationViewChild" parent="@style/ ICInAppBannerNotificationView ">

    <item name="titleTextColor">@color/title_text_light</item>
    <item name="titleTextSize">@dimen/default_title_text_size</item>
    <item name="titleTextTypeface">bold</item>

    <item name="textColor">@color/sonic_silver</item>
    <item name="textSize">@dimen/default_text_size </item>
    <item name="textTypeface">normal</item>

    <item name="backgroundColor">@android:color/white</item>

    <item name="buttonTextColor">@color/btn_text_light</item>
    <item name="buttonTextSize">@dimen/default_text_size</item>
    <item name="buttonTextTypeface">normal</item>
    <item name="buttonBackgroundColor">@android:color/white</item>

    <item name="closeButtonSrc">@drawable/ic_close_light</item>
    <item name="expandButtonSrc">@drawable/ic_expand_light</item>
    <item name="collapseButtonSrc">@drawable/ic_collapse_light</item>

</style>

Finally, apply the style within the app theme:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

<item name=" ICInAppBannerNotificationView ">@style/ICInAppBannerNotificationViewChild</item>

        …..
</style>

SDK supports Light and Dark themes for Banner InAppNotification. By default Light theme will be applied for Banner.
Please find below sample code for applying Dark Theme to Banner InAppNotification.

Sample code for Applying Dark theme to Banner:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

<item name="ICInAppBannerNotificationView">@style/ICInAppBannerNotificationView.Dark</item>

        …..
</style>

Style attributes

ICInAppBannerNotificationView

NameDescriptionExampleSupported Values
titleTextColor ttext color for the InAppNotification TitleEx: @color/default_title_text_colorA color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".
titleTextSizetext size for the InAppNotification TitleEx : @dimen/default_title_text_sizeA dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).
titleTextTypefaceTypeface for the InAppNotification titleEx: normalMust be one of the following constant values monospace(3),normal(0),sans(1),serif (2)
textColorText color for InAppNotification bodyEx: @color/befault_text_colorA color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".
textSizeText size for InAppNotification BodyEx: @dimen/default_text_sizeA dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).
backgroundColorBackground colour for InAppNotificationEx: @color/default_bg_colorMay be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

May be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".
buttonTextColorText color for InAppNotification buttonEx: @color/button_text_colorMay be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".
buttonTextSizeText size for InAppNotification buttonEx: @dimen/default_text_sizeMay be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).
buttonTextTypefaceTypeface for InAppNotification buttonEx: normalMust be one of the following constant values monospace(3),normal(0),sans(1),serif (2)
buttonBackgroundColorBackground color for InAppNotification buttonEx: @color/button_text_colorMay be a color value, in the form of "#rgb", "#argb", "#rrggbb", or "#aarrggbb".
closeButtonSrcImage resource for InAppNotification close buttonEx: @drawable/ic_closeReference to a drawable resource to use for the close Button.
expandButtonSrcImage resource for InAppNotification expand buttonEx: @ drawable / ic_expandReference to a drawable resource to use for the expand Button.
collapseButtonSrcImage resource for InAppNotification collapse buttonEx: @ drawable / ic_collapseReference to a drawable resource to use for the collapse Button.