Bixby Developer Center

Guides

layout

optional

Defines the layout of the given view. You can define this in a separate *.layout.bxb file, under the appropriate locale-specific resources folder, or directly in the given view. For more information, see Layouts.

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.

You can loop the components within a layout's content if needed using a for-each loop:

Examples

// Part of a larger view file
// Also demonstrates how to use the `for-each` loop
...
layout {
content {
for-each (x) {
as (y) {
section {
content {
...
}
}
}
}
}
...
// resources/base/layouts/details/RideShare_Details.layout.bxb
layout {
match: RideShare (rideShare)
mode (Details)

content {
section {
content {
map-card {
...
}
}
}
}
}

Child Keys

content
required
Layout container that holds informational content
match
required
Use match patterns to dynamically lookup the appropriate response for the current context
mode
required
Defines the layout type and/or which layout file to call