ICInAppModalNotificationViewBinder

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

Styling

The style of the Modal can be set by configuring the appropriate style attributes within your apps styles.xml.
Internally ICInAppModalNotificationViewBinder 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="ICInAppModalNotificationViewChild" parent="@style/ ICInAppModalNotificationView ">

<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>

</style>

Finally, apply the style within the app theme:

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

<item name=" ICInAppModalNotificationView ">@style/ICInAppModalNotificationViewChild</item>

        …..
</style>

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

Sample code for Applying Dark theme to Modal:

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

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


        …..
</style>

Style attributes

ICInAppModalNotificationView

NameDescriptionExampleSupported Values
titleTextColortext 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".