LayoutManager
is responsible for sending display requests to MentraOS Cloud to show layouts in the AR view. It provides methods for displaying different types of content in the user’s field of view.
You access the LayoutManager through the layouts
property of a AppSession
instance:
text
: The text content to displayoptions
: Optional parameters
view
: Target view (ViewType.MAIN
or ViewType.DASHBOARD
). Defaults to MAIN
durationMs
: Optional duration in milliseconds to show the layouttopText
: Text for the top sectionbottomText
: Text for the bottom sectionoptions
: Optional parameters
view
: Target view (ViewType.MAIN
or ViewType.DASHBOARD
). Defaults to MAIN
durationMs
: Optional duration in millisecondstitle
: The title of the cardtext
: The main content text of the cardoptions
: Optional parameters
view
: Target view (ViewType.MAIN
or ViewType.DASHBOARD
). Defaults to MAIN
durationMs
: Optional duration in millisecondsleftText
: Text for the left side (often a label)rightText
: Text for the right side (often a value)options
: Optional parameters
view
: Target view (ViewType.MAIN
or ViewType.DASHBOARD
). Defaults to DASHBOARD
durationMs
: Optional duration in millisecondsViewType
enum is used to specify where in the AR display the layout should appear: