diff --git a/iterableapi-ui/src/main/java/com/iterable/iterableapi/ui/embedded/IterableEmbeddedView.kt b/iterableapi-ui/src/main/java/com/iterable/iterableapi/ui/embedded/IterableEmbeddedView.kt index 348426eab..b8701f9d5 100644 --- a/iterableapi-ui/src/main/java/com/iterable/iterableapi/ui/embedded/IterableEmbeddedView.kt +++ b/iterableapi-ui/src/main/java/com/iterable/iterableapi/ui/embedded/IterableEmbeddedView.kt @@ -94,23 +94,11 @@ class IterableEmbeddedView( val titleText = view.findViewById(R.id.embedded_message_title) val bodyText = view.findViewById(R.id.embedded_message_body) - if(config?.primaryBtnBackgroundColor != null) { - val primaryBtnBackgroundDrawable = if(viewType == IterableEmbeddedViewType.NOTIFICATION) - ContextCompat.getDrawable(requireContext(), R.drawable.primary_notification_button_background) as? GradientDrawable - else ContextCompat.getDrawable(requireContext(), R.drawable.primary_banner_button_background) as? GradientDrawable - primaryBtnBackgroundDrawable?.setColor(primaryBtnBackgroundColor) - - firstButton.background = primaryBtnBackgroundDrawable - } - - if(config?.secondaryBtnBackgroundColor != null) { - val secondaryBtnBackgroundDrawable = if(viewType == IterableEmbeddedViewType.NOTIFICATION) - ContextCompat.getDrawable(requireContext(), R.drawable.secondary_notification_button_background) as? GradientDrawable - else ContextCompat.getDrawable(requireContext(), R.drawable.secondary_banner_button_background) as? GradientDrawable - secondaryBtnBackgroundDrawable?.setColor(secondaryBtnBackgroundColor) + firstButton.setBackgroundColor(primaryBtnBackgroundColor) + firstButton.setTextColor(primaryBtnTextColor) - secondButton.background = secondaryBtnBackgroundDrawable - } + secondButton.setBackgroundColor(secondaryBtnBackgroundColor) + secondButton.setTextColor(secondaryBtnTextColor) firstButton.setTextColor(primaryBtnTextColor) secondButton.setTextColor(secondaryBtnTextColor) diff --git a/iterableapi-ui/src/main/res/drawable/primary_banner_button_background.xml b/iterableapi-ui/src/main/res/drawable/primary_banner_button_background.xml deleted file mode 100644 index 7d44a8e49..000000000 --- a/iterableapi-ui/src/main/res/drawable/primary_banner_button_background.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/iterableapi-ui/src/main/res/drawable/primary_card_button_background.xml b/iterableapi-ui/src/main/res/drawable/primary_card_button_background.xml deleted file mode 100644 index eb087387a..000000000 --- a/iterableapi-ui/src/main/res/drawable/primary_card_button_background.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/iterableapi-ui/src/main/res/drawable/primary_notification_button_background.xml b/iterableapi-ui/src/main/res/drawable/primary_notification_button_background.xml deleted file mode 100644 index 498fc89d9..000000000 --- a/iterableapi-ui/src/main/res/drawable/primary_notification_button_background.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/iterableapi-ui/src/main/res/drawable/secondary_banner_button_background.xml b/iterableapi-ui/src/main/res/drawable/secondary_banner_button_background.xml deleted file mode 100644 index eb087387a..000000000 --- a/iterableapi-ui/src/main/res/drawable/secondary_banner_button_background.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/iterableapi-ui/src/main/res/drawable/secondary_card_button_background.xml b/iterableapi-ui/src/main/res/drawable/secondary_card_button_background.xml deleted file mode 100644 index eb087387a..000000000 --- a/iterableapi-ui/src/main/res/drawable/secondary_card_button_background.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/iterableapi-ui/src/main/res/drawable/secondary_notification_button_background.xml b/iterableapi-ui/src/main/res/drawable/secondary_notification_button_background.xml deleted file mode 100644 index a42cf0e83..000000000 --- a/iterableapi-ui/src/main/res/drawable/secondary_notification_button_background.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/iterableapi-ui/src/main/res/layout-v21/banner_view.xml b/iterableapi-ui/src/main/res/layout-v21/banner_view.xml index 9f5fff581..39c2623a4 100644 --- a/iterableapi-ui/src/main/res/layout-v21/banner_view.xml +++ b/iterableapi-ui/src/main/res/layout-v21/banner_view.xml @@ -69,43 +69,37 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintBottom_toBottomOf="parent"> -