From 56a75b6b1e69f53132a208830d5def4d032f8b41 Mon Sep 17 00:00:00 2001 From: Ryan Morales Date: Mon, 11 Nov 2024 13:23:37 -0800 Subject: [PATCH] second batch of updates for android content card ui documentation --- gatsby-config.js | 16 ++++----- .../content-card-ui/Android/api-usage.md | 4 +-- .../Android/public-classes/aepui.md | 10 ++++-- .../content-provider/aepuicontentprovider.md | 33 +++++++++++++++++-- .../content-provider/contentcarduiprovider.md | 33 +++++++++++++++++-- .../public-classes/contentcardmapper.md | 6 ++-- .../contentcarduieventlistener.md | 6 ++-- .../observers/aepuieventobserver.md | 25 +++++++++++++- .../observers/contentcardeventobserver.md | 21 +++++++++++- .../public-classes/state/aepcarduistate.md | 23 +++++++++++-- .../state/smallimagecarduistate.md | 23 +++++++++++-- .../Android/public-classes/styles/README.md | 12 ------- .../public-classes/styles/aepbuttonstyle.md | 19 +++++++++-- .../public-classes/styles/aepcardstyle.md | 17 +++++++++- .../public-classes/styles/aepcolumnstyle.md | 19 +++++++++-- .../public-classes/styles/aepiconstyle.md | 17 +++++++++- .../public-classes/styles/aepimagestyle.md | 17 +++++++++- .../public-classes/styles/aeprowstyle.md | 19 +++++++++-- .../public-classes/styles/aeptextstyle.md | 17 +++++++++- .../styles/smallimageuistyle.md | 25 +++++++++++--- .../public-classes/ui-models/README.md | 11 ------- .../public-classes/ui-models/aepbutton.md | 17 +++++++++- .../public-classes/ui-models/aepicon.md | 17 +++++++++- .../public-classes/ui-models/aepimage.md | 17 +++++++++- .../public-classes/ui-models/aeptext.md | 17 +++++++++- .../public-classes/ui-models/aepuitemplate.md | 21 +++++++++++- .../ui-models/aepuitemplatetype.md | 19 +++++++++-- .../ui-models/smallimagetemplate.md | 27 ++++++++++++--- .../Android/public-classes/uiaction.md | 2 +- .../Android/public-classes/uievent.md | 16 ++++----- .../customizing-content-card-templates.md | 8 +++-- .../tutorial/displaying-content-cards.md | 6 ++-- .../tutorial/listening-content-card-events.md | 2 +- 33 files changed, 451 insertions(+), 91 deletions(-) delete mode 100644 src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/README.md delete mode 100644 src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/README.md diff --git a/gatsby-config.js b/gatsby-config.js index 1735389448..da972772e7 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -397,12 +397,12 @@ module.exports = { path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/aepuieventobserver", pages: [ { - title: "AepUIContentProvider", + title: "AepUIEventObserver", path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/aepuieventobserver", }, { - title: "ContentCardUIProvider", - path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/aepuieventobserver", + title: "ContentCardEventObserver", + path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/contentcardeventobserver", } ] }, @@ -456,7 +456,7 @@ module.exports = { }, { title: "UI Models", - path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/", + path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepbutton", pages: [ { title: "AEPButton", @@ -475,12 +475,12 @@ module.exports = { path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aeptext" }, { - title: "AEPTemplate", - path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aeptemplate" + title: "AEPUITemplate", + path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplate" }, { - title: "AEPTemplateType", - path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aeptemplatetype" + title: "AEPUITemplateType", + path: "/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplatetype" }, { title: "SmallImageTemplate", diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/api-usage.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/api-usage.md index 702b5b3d07..cba2f0a454 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/api-usage.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/api-usage.md @@ -15,7 +15,7 @@ keywords: # API Reference -This document lists the public APIs available in the Messaging extension for implementing content card with UI. +This document provides information on how to use the Messaging APIs to receive content card views in your application. ### getContentCardUI @@ -23,7 +23,7 @@ The `getContentCardUI` method retrieves a flow of [AepUI](./public-classes/aepui -Calling this API will not download content cards from Adobe Journey Optimizer; it will only retrieve the content cards that are already downloaded and cached by the Messaging extension. You **must** call [`updatePropositionsForSurfaces`](../api-usage.md#updatePropositionsForSurfaces) API from the AEPMessaging extension with the desired surfaces prior to calling this API. +Calling this API will not download content cards from Adobe Journey Optimizer; it will only retrieve the content cards that are already downloaded and cached by the Messaging extension. You **must** call [`updatePropositionsForSurfaces`](../../code-based/api-reference.md#updatePropositionsForSurfaces) API from the AEPMessaging extension with the desired surfaces prior to calling this API. #### Syntax diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/aepui.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/aepui.md index 2e8148b8b4..076418e1c8 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/aepui.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/aepui.md @@ -21,7 +21,9 @@ The `AepUI` interface represents a UI component that can be rendered using the A ## Interface Definition - + + +#### Kotlin ```kotlin sealed interface AepUI { @@ -91,11 +93,13 @@ fun updateState(newState: S) ## SmallImageUI -Implementation of the [AepUI](./aepui.md#Sealed Interface - AepUI) interface used in rendering a UI for a [SmallImageTemplate](./UIModels/smallimagetemplate.md). +Implementation of the [AepUI](#AepUI) interface used in rendering a UI for a [SmallImageTemplate](./ui-models/smallimagetemplate.md). ## Class Definition - + + +#### Kotlin ```kotlin class SmallImageUI( diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/content-provider/aepuicontentprovider.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/content-provider/aepuicontentprovider.md index dcb399431f..5a8ba15ad8 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/content-provider/aepuicontentprovider.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/content-provider/aepuicontentprovider.md @@ -1,4 +1,19 @@ -# Interface - AepUIContentProvider +--- +title: AepUIContentProvider +description: This document contains information on the AepUIContentProvider interface. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepUIContentProvider Responsible for retrieving and refreshing data as required by the UI. @@ -6,6 +21,10 @@ Classes implementing this interface will define a strategy to provide content fo ## Interface Definition + + +#### Kotlin + ```kotlin interface AepUIContentProvider { suspend fun getContent(): Flow> @@ -21,20 +40,28 @@ Retrieves the content for the UI. #### Returns -The content for the UI as a flow of [AepUITemplate](../UIModels/aepuitemplate.md)s. +The content for the UI as a flow of [AepUITemplate](../ui-models/aepuitemplate.md)s. #### Syntax + + +#### Kotlin + ```kotlin suspend fun getContent(): Flow> ``` ### refreshContent -Refreshes the content for the UI. Implementations should update the data into the flow returned by [getContent](./aepuicontentprovider.md#getContent). +Refreshes the content for the UI. Implementations should update the data into the flow returned by [getContent](#getContent). #### Syntax + + +#### Kotlin + ```kotlin suspend fun refreshContent() ``` \ No newline at end of file diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/content-provider/contentcarduiprovider.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/content-provider/contentcarduiprovider.md index aff9d50ce4..7e0060931a 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/content-provider/contentcarduiprovider.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/content-provider/contentcarduiprovider.md @@ -1,4 +1,19 @@ -# Class - ContentCardUIProvider +--- +title: ContentCardUIProvider +description: This document contains information on the ContentCardUIProvider interface. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# ContentCardUIProvider Messaging extension implementation of [AepUIContentProvider](./aepuicontentprovider.md). ContentCardUiProvider is responsible for fetching and managing the content for a given surface. It uses Adobe Messaging APIs to retrieve propositions and transform them into UI templates for display. @@ -10,17 +25,21 @@ Retrieves a flow of AepUITemplate lists for the given surface. The flow emits up #### Returns -A flow that emits lists of [AepUITemplate](../UIModels/aepuitemplate.md)s. +A flow that emits lists of [AepUITemplate](../ui-models/aepuitemplate.md)s. #### Syntax + + +#### Kotlin + ```kotlin override suspend fun getContent(): Flow> ``` ### getContentCardUI -Retrieves a flow of AepUI instances for the given surface. This function initiates the content fetch using [getContent](./contentcarduiprovider.md#getcontent) and then returns a flow of AepUI instances that represent the UI templates. The flow emits updates whenever new content is fetched or any changes occur. +Retrieves a flow of AepUI instances for the given surface. This function initiates the content fetch using [getContent](#getcontent) and then returns a flow of AepUI instances that represent the UI templates. The flow emits updates whenever new content is fetched or any changes occur. #### Returns @@ -28,6 +47,10 @@ A [Flow](https://developer.android.com/kotlin/flow) that emits a list of AepUI i #### Syntax + + +#### Kotlin + ```kotlin suspend fun getContentCardUI(): Flow>> ``` @@ -38,6 +61,10 @@ Updates the flow returned by [getContent](#getContent) with the latest cached co #### Syntax + + +#### Kotlin + ```kotlin override suspend fun refreshContent() ``` diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/contentcardmapper.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/contentcardmapper.md index 6917edd6c9..3e513b2954 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/contentcardmapper.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/contentcardmapper.md @@ -15,11 +15,13 @@ keywords: # ContentCardMapper -Singleton class used to store a mapping between valid [ContentCardSchemaData](../../../public-classes/content-card-schema-data.md) and unique proposition id's. The schema data is used when sending proposition track requests to AJO. +Singleton class used to store a mapping between valid [ContentCardSchemaData](../../../public-classes/content-card-schema-data.md#android-interface) and unique proposition id's. The schema data is used when sending proposition track requests to AJO. ## Class Definition - + + +#### Kotlin ```kotlin class ContentCardMapper private constructor() { diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/contentcarduieventlistener.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/contentcarduieventlistener.md index 5c6138b518..cea412d4c9 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/contentcarduieventlistener.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/contentcarduieventlistener.md @@ -1,6 +1,6 @@ --- title: ContentCardUIEventListener -description: This document contains information regarding the ContentCardUIEventListener and its callback functions. +description: This document contains information on implementing the ContentCardUIEventListener. keywords: - Adobe Journey Optimizer - Guide @@ -19,7 +19,9 @@ Interface to handle different callback events which can occur for a displayed co ## Interface Definition - + + +#### Kotlin ```kotlin interface ContentCardUIEventListener { diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/aepuieventobserver.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/aepuieventobserver.md index 2d7ceb8289..f789d635fa 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/aepuieventobserver.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/aepuieventobserver.md @@ -1,8 +1,27 @@ -# Interface - AepUIEventObserver +--- +title: AepUIEventObserver +description: This document contains information on the AepUIEventObserver interface. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepUIEventObserver Interface for observing events related to AEP UI components. This interface defines a mechanism for handling various types of events triggered by lifecycle changes or user interactions with UI elements, such as display, dismiss, or user interaction events. ## Interface Definition + + +#### Kotlin + ```kotlin interface AepUIEventObserver { fun onEvent(event: UIEvent<*, *>) @@ -21,6 +40,10 @@ Called when an event related to a UI template occurs. #### Syntax + + +#### Kotlin + ```kotlin fun onEvent(event: UIEvent<*, *>) ``` diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/contentcardeventobserver.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/contentcardeventobserver.md index 90711483b1..b9e82aa10c 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/contentcardeventobserver.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/observers/contentcardeventobserver.md @@ -1,4 +1,19 @@ -# Class - ContentCardEventObserver +--- +title: ContentCardEventObserver +description: This document contains information on the ContentCardEventObserver class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# ContentCardEventObserver Messaging implementation of [AepUIEventObserver](./aepuieventobserver.md) for handling content card events. @@ -14,6 +29,10 @@ Called when an event related to a Content Card UI template occurs. #### Syntax + + +#### Kotlin + ```kotlin override fun onEvent(event: UIEvent<*, *>) ``` diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/state/aepcarduistate.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/state/aepcarduistate.md index 6a815aaf78..af40357dd1 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/state/aepcarduistate.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/state/aepcarduistate.md @@ -1,8 +1,27 @@ -# Open Class - AepCardUIState +--- +title: AepCardUIState +description: This document contains information on the AepCardUIState. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- -Class representing the state of an AEP card. This class includes the common properties `dismissed` and `displayed` which are common across different card states. +# AepCardUIState + +Class representing the state of an AEP card. This class includes the properties `dismissed` and `displayed` which are common across different card states. ## Class Definition + + +#### Kotlin + ```kotlin open class AepCardUIState( open val dismissed: Boolean = false, diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/state/smallimagecarduistate.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/state/smallimagecarduistate.md index 8802dde199..06002388d1 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/state/smallimagecarduistate.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/state/smallimagecarduistate.md @@ -1,8 +1,27 @@ -# Data Class - SmallImageCardUIState +--- +title: SmallImageCardUIState +description: This document contains information on the SmallImageCardUIState. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- -Class representing the UI state of a Small Image template card. +# SmallImageCardUIState + +Class which implements [AepCardUIState](./aepcarduistate.md) and represents the UI state of a Small Image template card. ## Class Definition + + +#### Kotlin + ```kotlin data class SmallImageCardUIState( override val dismissed: Boolean = false, diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/README.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/README.md deleted file mode 100644 index aa16a5fa9f..0000000000 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Styles - -Messaging provides the following styles that can be used to customize the UI elements of content cards: - -- [AepButtonStyle](./aepbuttonstyle.md) -- [AepCardStyle](./aepcardstyle.md) -- [AepColumnStyle](./aepcolumnstyle.md) -- [AepIconStyle](./aepiconstyle.md) -- [AepImageStyle](./aepimagestyle.md) -- [AepRowStyle](./aeprowstyle.md) -- [AepTextStyle](./aeptextstyle.md) -- [SmallImageUIStyle](./smallimageuistyle.md) diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepbuttonstyle.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepbuttonstyle.md index 501fe8abb7..f54d78753a 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepbuttonstyle.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepbuttonstyle.md @@ -1,6 +1,21 @@ -# Class - AepButtonStyle +--- +title: AepButtonStyle +description: This document contains information on the AepButtonStyle class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- -Class representing the style of an AEPButton Composable. +# AepButtonStyle + +Class representing the style of an AepButton Composable. ## Public Properties diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepcardstyle.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepcardstyle.md index d9651010f0..4a18c622f9 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepcardstyle.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepcardstyle.md @@ -1,4 +1,19 @@ -# Class - AepCardStyle +--- +title: AepCardStyle +description: This document contains information on the AepCardStyle class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepCardStyle Class representing the style for a Card Composable. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepcolumnstyle.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepcolumnstyle.md index c5450fa224..3e1a646370 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepcolumnstyle.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepcolumnstyle.md @@ -1,6 +1,21 @@ -# Class - AepColumnStyle +--- +title: AepColumnStyle +description: This document contains information on the AepColumnStyle class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- -Class representing the style for a column AEP UI. +# AepColumnStyle + +Class representing the style for a column within an AEP UI composable. ## Public Properties diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepiconstyle.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepiconstyle.md index c84124469a..2a0671ce2f 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepiconstyle.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepiconstyle.md @@ -1,4 +1,19 @@ -# Class - AepIconStyle +--- +title: AepIconStyle +description: This document contains information on the AepIconStyle class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepIconStyle Class representing the style for an AepIcon composable. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepimagestyle.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepimagestyle.md index 69bdc76785..950bc33275 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepimagestyle.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aepimagestyle.md @@ -1,4 +1,19 @@ -# Class - AepImageStyle +--- +title: AepImageStyle +description: This document contains information on the AepImageStyle class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepImageStyle Class representing the style for an AepImage composable. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aeprowstyle.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aeprowstyle.md index c2992af709..2cf846b9aa 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aeprowstyle.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aeprowstyle.md @@ -1,6 +1,21 @@ -# Class - AepRowStyle +--- +title: AepRowStyle +description: This document contains information on the AepRowStyle class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- -Class representing the style for a row AEP UI. +# AepRowStyle + +Class representing the style for a row within an AEP UI composable. ## Public Properties diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aeptextstyle.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aeptextstyle.md index 5f83d13ebb..758258d567 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aeptextstyle.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/aeptextstyle.md @@ -1,4 +1,19 @@ -# Class - AepTextStyle +--- +title: AepTextStyle +description: This document contains information on the AepTextStyle class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepTextStyle Class representing the style of an AEPText Composable. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/smallimageuistyle.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/smallimageuistyle.md index b260a68171..aa274aaeb2 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/smallimageuistyle.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/styles/smallimageuistyle.md @@ -1,4 +1,19 @@ -# Class - SmallImageUIStyle +--- +title: SmallImageUIStyle +description: This document contains information on the SmallImageUIStyle class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# SmallImageUIStyle Class representing the style for a small image AEP UI. @@ -10,7 +25,7 @@ Class representing the style for a small image AEP UI. | ---------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | | cardStyle | [AepCardStyle](./aepcardstyle.md) | The style for the card. | | rootRowStyle | [AepRowStyle](./aeprowstyle.md) | The style for the root row. | -| imageStyle | [AepImageStyle](./aepimagestyle,md) | The style for the image. | +| imageStyle | [AepImageStyle](./aepimagestyle.md) | The style for the image. | | textColumnStyle | [AepColumnStyle](./aepcolumnstyle.md) | The style for the column containing the title, body and buttons. | | titleTextStyle | [AepTextStyle](./aeptextstyle.md) | The text style for the title. | | bodyTextStyle | [AepTextStyle](./aeptextstyle.md) | The text style for the body. | @@ -23,9 +38,11 @@ Class representing the style for a small image AEP UI. The `SmallImageUIStyle` is created using a builder. Here's an example: + + +#### Kotlin + ```kotlin -// Displaying content cards in a Row -// create a custom style for the small image card in row val smallImageCardStyleRow = SmallImageUIStyle.Builder() .cardStyle(AepCardStyle(modifier = Modifier.width(400.dp).height(200.dp))) .rootRowStyle( diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/README.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/README.md deleted file mode 100644 index a64baec861..0000000000 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# UI Models - -Messaging provides the following UI Models that act as building blocks for creating templated content cards: - -- [AepButton](./aepbutton.md) -- [AepIcon](./aepicon.md) -- [AepImage](./aepimage.md) -- [AepText](./aeptext.md) -- [AepUITemplate](./aepuitemplate.md) -- [AepUITemplateType](./aepuitemplatetype.md) -- [SmallImageTemplate](./smallimagetemplate.md) diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepbutton.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepbutton.md index fe82475edb..b58b9cd42d 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepbutton.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepbutton.md @@ -1,4 +1,19 @@ -# Data Class - AepButton +--- +title: AepButton +description: This document contains information on the AepButton ui model. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepButton Data class representing a button element in the UI. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepicon.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepicon.md index 44a1321805..b67be4518d 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepicon.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepicon.md @@ -1,4 +1,19 @@ -# Data Class - AepIcon +--- +title: AepIcon +description: This document contains information on the AepIcon ui model. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepIcon Data class representing an icon element in the UI. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepimage.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepimage.md index a773a3dddd..51542b87e0 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepimage.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepimage.md @@ -1,4 +1,19 @@ -# Data Class - AepImage +--- +title: AepImage +description: This document contains information on the AepImage ui model. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepImage Data class representing an image element in the UI. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aeptext.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aeptext.md index 1d590b087b..e92de62f80 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aeptext.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aeptext.md @@ -1,4 +1,19 @@ -# Data Class - AepText +--- +title: AepText +description: This document contains information on the AepText ui model. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepText Data class representing a text element in the UI. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplate.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplate.md index c417e5b18d..e2348671cc 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplate.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplate.md @@ -1,4 +1,19 @@ -# Interface - AepUITemplate +--- +title: AepUITemplate +description: This document contains information on the AepUITemplate interface. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepUITemplate Interface representing a generic UI template in AEP. @@ -10,6 +25,10 @@ Gets the type of the UI template. #### Syntax + + +#### Kotlin + ``` kotlin fun getType(): AepUITemplateType ``` \ No newline at end of file diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplatetype.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplatetype.md index 460162be96..7e1f429e70 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplatetype.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/aepuitemplatetype.md @@ -1,4 +1,19 @@ -# Enum - AepUITemplateType +--- +title: AepUITemplateType +description: This document contains information on the AepUITemplateType enumeration. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# AepUITemplateType An enumeration of the different types of content card templates supported by the Messaging framework. @@ -8,4 +23,4 @@ Each case corresponds to a specific template type, identified by its JSON string | Case | Raw Value | Description | | ----------- | ------------ | ------------------------------------------------------------ | -| SMALL_IMAGE | `SmallImage` | Represents [SmallImageTemplate](../UIModels/smallimagetemplate.md). | +| SMALL_IMAGE | `SmallImage` | Represents [SmallImageTemplate](../ui-models/smallimagetemplate.md). | diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/smallimagetemplate.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/smallimagetemplate.md index 909bc63edf..3ba739e4f6 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/smallimagetemplate.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/ui-models/smallimagetemplate.md @@ -1,6 +1,21 @@ -# Data Class - SmallImageTemplate - -Class representing a small image template, which implements the [AepUITemplate](aepuitemplate.md) interface. +--- +title: SmallImageTemplate +description: This document contains information on the SmallImageTemplate class. +keywords: +- Adobe Journey Optimizer +- Guide +- Content Card +- Messaging +- Customizing UI +- Card Templates +- Content Card Templates +- Small Image Template +- Android +--- + +# SmallImageTemplate + +Class which implements [AepUITemplateType](./aepuitemplatetype) and represents a small Image template. ## Public Properties @@ -18,10 +33,14 @@ Class representing a small image template, which implements the [AepUITemplate]( ### getType -Returns the type of this template, which is [AepUITemplateType](aepuitemplatetype.md).SMALL_IMAGE. +Returns the type of this template, which is `AepUITemplateType.SMALL_IMAGE`. #### Syntax + + +#### Kotlin + ``` kotlin override fun getType() = AepUITemplateType.SMALL_IMAGE ``` \ No newline at end of file diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/uiaction.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/uiaction.md index e935f920f3..5aeb7daa5f 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/uiaction.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/uiaction.md @@ -27,7 +27,7 @@ Represents an action that can be performed on a UI component. sealed class UIAction ``` -## Data Class - Click +## Click Represents a click UIAction that can be performed on a UI component. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/uievent.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/uievent.md index dd00260cb9..3543d41626 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/uievent.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/public-classes/uievent.md @@ -13,15 +13,15 @@ keywords: - Android --- -# Class - UIEvent +# UIEvent Represents different types of UI events that can be triggered by the user interaction on the UI templates. #### Class Parameters -| Parameter | Type | Description | -| --------- | -------------------------------------------- | ------------------------------------------------------------ | -| T | [AepUITemplate](./UIModels/aepuitemplate.md) | Represents a UI template model which backs the composable on which the event has occurred. | -| S | [AepCardUIState](./State/aepcarduistate.md) | Represents the state of the AEP card composable on which the event has occurred. | +| Parameter | Type | Description | +| --------- | --------------------------------------------- | ------------------------------------------------------------ | +| T | [AepUITemplate](./ui-models/aepuitemplate.md) | Represents a UI template model which backs the composable on which the event has occurred. | +| S | [AepCardUIState](./state/aepcarduistate.md) | Represents the state of the AEP card composable on which the event has occurred. | #### Syntax @@ -39,7 +39,7 @@ sealed class UIEvent(open val aepUi: AepU | -------- | ------------------- | ------------------------------------ | | aepUI | [AepUI](./aepui.md) | The AepUI associated with the event. | -## Data Class - Display +## Display Event that represents the display of a UI element. @@ -54,7 +54,7 @@ data class Display(override val aepUi: Ae UIEvent(aepUi) ``` -## Data Class - Interact +## Interact Event that represents a user interaction with a UI element. The `Interact` event captures the different types of interactions that a user can have with a UI component. Currently supported interactions types are can be seen in [UIAction](./uiaction.md) documentation. @@ -87,7 +87,7 @@ data class Interact( observer?.onEvent(AepUiEvent.Interact(ui, UIAction.Click(id = "purchaseID", actionUrl = "https://www.adobe.com")) ``` -## Data Class - Dismiss +## Dismiss Event that represents the dismissal of a UI element. diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/customizing-content-card-templates.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/customizing-content-card-templates.md index b2c5786356..ce775a2758 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/customizing-content-card-templates.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/customizing-content-card-templates.md @@ -17,17 +17,21 @@ This tutorial explains how to customize the UI of content cards in your applicat ## Overview -The Messaging extension provides a way to customize content cards by using [Compose modifiers](https://developer.android.com/develop/ui/compose/modifiers?hl=en) in conjunction with additional parameters provided when creating a [style](../public-classes/Styles/README.md) object. Refer to each individual style class to see the customizable settings available for each style. +The Messaging extension provides a way to customize content cards by using [Compose modifiers](https://developer.android.com/develop/ui/compose/modifiers?hl=en) in conjunction with additional parameters provided when creating a style object. Refer to each individual style class to see the customizable settings available for each style. ## Setting custom style parameters when creating a `SmallImageUIStyle` Perform the following steps to customize content card templates: -1. Create a style object with a `Modifier` as well as any additional customizations passed in as part of the constructor parameters (e.g. if customizing an [AepButtonStyle](../public-classes/Styles/aepbuttonstyle.md) , then along with the `Modifier`, the enabled state, elevation, shape, border, color, and padding can be customized if desired.) +1. Create a style object with a `Modifier` as well as any additional customizations passed in as part of the constructor parameters (e.g. if customizing an [AepButtonStyle](../public-classes/styles/aepbuttonstyle.md) , then along with the `Modifier`, the enabled state, elevation, shape, border, color, and padding can be customized if desired.) 2. Use the created style object when invoking the builder of the template style object (e.g. `SmallImageUIStyle`) Below is an example implementation: + + +#### Kotlin + ```kotlin // create a custom style for the small image card in row val smallImageCardStyleRow = SmallImageUIStyle.Builder() diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/displaying-content-cards.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/displaying-content-cards.md index 6a9d0c6cb3..96e2152b1f 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/displaying-content-cards.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/displaying-content-cards.md @@ -69,7 +69,9 @@ class AepContentCardViewModel(private val contentCardUIProvider: ContentCardUIPr } ``` -> Note - only content cards for which the user has qualified are returned by the getContentCardUI API. Client-side rules are defined in the Adobe Journey Optimizer campaign. + + +Note - only content cards for which the user has qualified are returned by the getContentCardUI API. Client-side rules are defined in the Adobe Journey Optimizer campaign. ## Display Content Cards @@ -109,7 +111,7 @@ private fun AepContentCardList(viewModel: AepContentCardViewModel) { } ``` -Refer to this [TestApp](../../../../code/testapp/) for a complete example of how to display, customize and listen to UI events from content cards in a Compose UI application. +Refer to this [TestApp](https://github.com/adobe/aepsdk-messaging-android/tree/feature/content-cards/code/testapp) for a complete example of how to display, customize and listen to UI events from content cards in a Compose UI application. #### Retrieve ContentCardSchemaData from the Messaging extension diff --git a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/listening-content-card-events.md b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/listening-content-card-events.md index cad88f646b..02f7fa09bd 100644 --- a/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/listening-content-card-events.md +++ b/src/pages/edge/adobe-journey-optimizer/content-card-ui/Android/tutorial/listening-content-card-events.md @@ -55,7 +55,7 @@ class ContentCardCallback: ContentCardUIEventListener { } ``` -2. Pass the listener to the [ContentCardEventObservers](../public-classes/Observers/contentcardeventobserver.md) class when retrieving the card composable. +2. Pass the listener to the [ContentCardEventObservers](../public-classes/observers/contentcardeventobserver.md) class when retrieving the card composable.