AepUI
The AepUI
interface represents a UI component that can be rendered using the Adobe Experience Platform compose UI library. The Experience Platform compose UI library currently supports rendering the following UI template:
SmallImageUI
which rendersSmall Image template
LargeImageUI
which rendersLarge Image template
ImageOnlyUI
which rendersImage Only template
Interface Definition
Copied to your clipboardsealed interface AepUI<T : AepUITemplate, S : AepCardUIState> {fun getTemplate(): Tfun getState(): Sfun updateState(newState: S)}
Methods
getTemplate
Retrieves the template associated with this UI component.
Returns
A template of type T
which is an implementation of the AepUITemplate
interface.
Syntax
Copied to your clipboardfun getTemplate(): T
getState
Retrieves the current state of the UI component.
Returns
A state of type S
which is a subclass of the AepCardUIState
class.
Syntax
Copied to your clipboardfun getState(): S
updateState
Updates the state of the UI component with a new state.
Parameters
- newState - The new state of type
S
to update within the UI component.
Syntax
Copied to your clipboardfun updateState(newState: S)
Implementing Classes
ImageOnlyUI
Implementation of the AepUI interface used in rendering a UI for a ImageOnlyTemplate.
Class Definition
Copied to your clipboardclass ImageOnlyUI(private val template: ImageOnlyTemplate,state: ImageOnlyCardUIState) : AepUI<ImageOnlyTemplate, ImageOnlyCardUIState>
LargeImageUI
Implementation of the AepUI interface used in rendering a UI for a LargeImageTemplate.
Class Definition
Copied to your clipboardclass LargeImageUI(private val template: LargeImageTemplate,state: LargeImageCardUIState) : AepUI<LargeImageTemplate, LargeImageCardUIState>
SmallImageUI
Implementation of the AepUI interface used in rendering a UI for a SmallImageTemplate.
Class Definition
Copied to your clipboardclass SmallImageUI(private val template: SmallImageTemplate,state: SmallImageCardUIState) : AepUI<SmallImageTemplate, SmallImageCardUIState>