public class ButtonThemeHelper
extends java.lang.Object
| Constructor and Description |
|---|
ButtonThemeHelper() |
| Modifier and Type | Method and Description |
|---|---|
static android.graphics.drawable.GradientDrawable |
calculateHighlightBackground(io.didomi.sdk.resources.ResourcesHelper resourcesHelper,
AppConfiguration.Theme theme)
Calculate the complete background object for a highlighted button.
|
static android.graphics.drawable.GradientDrawable |
calculateHighlightBackground(io.didomi.sdk.resources.ResourcesHelper resourcesHelper,
AppConfiguration.Theme theme,
int colorInt)
Calculate the complete background object for a highlighted button.
|
static int |
calculateHighlightBackgroundColor(AppConfiguration.Theme theme)
Get the highlight background color.
|
static int |
calculateHighlightTextColor(AppConfiguration.Theme theme)
Get highlight text color.
|
static int |
calculateLinkColor(AppConfiguration.Theme theme)
Extract the link color from the theme.
|
static android.graphics.drawable.GradientDrawable |
calculateRegularBackground(io.didomi.sdk.resources.ResourcesHelper resourcesHelper,
AppConfiguration.Theme theme)
Calculate the complete background object for a regular button.
|
static android.graphics.drawable.GradientDrawable |
calculateRegularBackground(io.didomi.sdk.resources.ResourcesHelper resourcesHelper,
AppConfiguration.Theme theme,
int colorInt)
Calculate the complete background object for a regular button.
|
static int |
calculateRegularBackgroundColor(AppConfiguration.Theme theme)
Get regular background color.
|
static int |
calculateRegularTextColor(AppConfiguration.Theme theme)
Get regular text color.
|
static int |
calculateThemeColor(AppConfiguration.Theme theme)
Get the theme color.
|
static boolean |
isLinkColorSet(AppConfiguration.Theme theme)
Detect if link color is set.
|
public static int calculateHighlightBackgroundColor(AppConfiguration.Theme theme)
theme - the configured themepublic static int calculateRegularBackgroundColor(AppConfiguration.Theme theme)
theme - the configured themepublic static int calculateHighlightTextColor(AppConfiguration.Theme theme)
theme - the configured themepublic static int calculateRegularTextColor(AppConfiguration.Theme theme)
theme - the configured themepublic static android.graphics.drawable.GradientDrawable calculateHighlightBackground(io.didomi.sdk.resources.ResourcesHelper resourcesHelper,
AppConfiguration.Theme theme)
resourcesHelper - initialized ResourcesHelpertheme - the configured themepublic static android.graphics.drawable.GradientDrawable calculateHighlightBackground(io.didomi.sdk.resources.ResourcesHelper resourcesHelper,
AppConfiguration.Theme theme,
int colorInt)
resourcesHelper - initialized ResourcesHelpertheme - the configured themecolorInt - already calculated background colorpublic static android.graphics.drawable.GradientDrawable calculateRegularBackground(io.didomi.sdk.resources.ResourcesHelper resourcesHelper,
AppConfiguration.Theme theme)
resourcesHelper - initialized ResourcesHelpertheme - the configured themepublic static android.graphics.drawable.GradientDrawable calculateRegularBackground(io.didomi.sdk.resources.ResourcesHelper resourcesHelper,
AppConfiguration.Theme theme,
int colorInt)
resourcesHelper - initialized ResourcesHelpertheme - the configured themecolorInt - already calculated background colorpublic static int calculateLinkColor(AppConfiguration.Theme theme)
theme - the configured themepublic static boolean isLinkColorSet(AppConfiguration.Theme theme)
theme - the configured themepublic static int calculateThemeColor(AppConfiguration.Theme theme)
theme - the configured theme