Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ILayer

interface ILayer
Extends com.amazon.apmf.IStandard Fundamental layer abstraction to compose a layer tree for rendering purpose

Methods

getParent()

ILayer? getParent()
This method returns the parent layer of the current layer. If the current layer is the root layer or does not have a parent, the method returns nullptr.

Returns

ILayer? The return value is optional and might be absent. ILayer the parent layer, or nullptr if there is no parent.

getChildren()

ILayer*[] getChildren()
This method returns an array of the direct child layers of this layer.

Returns

ILayer*[] An array containing the direct child layers of this layer, or an empty array if this layer has no children.

getSize()

Size getSize()
This method returns the dimension of the layer

Returns

Size Size

setSize()

void setSize(Size size)
This method sets dimension of the layer

Parameters

size
Size — Required to specify the dimension of the layer

addChild()

bool addChild(ILayer* child)
This method adds given layer as child of the current layer.

Parameters

child
ILayer* — Required child layer

Returns

bool true if layer is successfully added as child, false otherwise

addChildAtIndex()

bool addChildAtIndex(ILayer* child, u32 index)
This method adds given layer as child of the current layer at certain index

Parameters

child
ILayer* — Required child layer
index
u32 — Required target child index

Returns

bool true if the layer is successfully added as a child. If the layer belong to any other parent, return false.

removeChild()

bool removeChild(ILayer* child)
This method removes the given layer from the list of children

Parameters

child
ILayer* — Required child layer

Returns

bool true if removal is successful. If this is not a valid child, return false.

detachFromParent()

void detachFromParent()
This method detaches the current layer from its parent layer.

removeAllChildren()

void removeAllChildren()
This method removes all child layers of the current layer.

getStorageType()

LayerStorageType getStorageType()
This method returns storage type of the current layer.

Returns

LayerStorageType Layer storage type of the current layer

setStorageType()

void setStorageType(LayerStorageType storage)
This method sets storage type of the layer.

Parameters

storage
LayerStorageType — Required storage type which needs to be set to the layer
Last modified on October 29, 2026