Bixby Developer Center

Guides
References

macro

optionalvalue required

Defines a layout, a portion of a layout, or a dialog with a macro. A macro that contains a dialog template can be used anywhere a dialog template is supported. Similarly, a macro that contains a layout component can be used anywhere the component it produces can be used. A macro can also be used in a different macro.

You can use this macro to define repeatable portions of your layouts and dialog, such as a card or a cell for a specific structure or entire portions of a Bixby View. You define the exact parameters within a macro using a macro-def. For more information, see Layout Macros and Dialog Macros.

Unlike in a layout-macro, you can define multiple components within a single macro.

Note

Be aware of which components you are adding to your layouts and layout macros, because different components are available under different views. If you call a layout or layout macro in a view and that layout specifies a component that the view does not support, Bixby Developer Studio will throw an error. Similarly, you should consider which layout macros are being called within a layout itself. The same layout macro invoked in one component might not be valid if used within a different component, as the list of supported child components could differ.

You can read the Designing with Bixby Views design guide and the Building Bixby Views (UI) developer guide to check if your layout is using the correct components for that moment and that view.

Example

result-view {
match: MyConcept(this)

render {
layout {
macro (my-macro) {
param (myParam) {
expression (this)
}
}
}
}
}

Child Keys

param
optional
Parameter to which the argument (specified as a child) should bind
select-button-text
optional
Selection button text