Bixby Developer Center

References

result-view

optional

Defines the layout used for results returned from Bixby. Within result-view, you can determine what to render based on the number of results returned, which might be zero, one, or more. For more information, including what to render when, see Result Views in Bixby Views.

To ensure that your result view stays within the conversation's capsule lock, you need to add conversation-drivers to your result view. For more information about capsule lock in general, you can read about Capsule Lock and Modality.

Note

A result-view can be rendered by a halt effect if the view's match pattern matches the halted node. In this case, the view will always have zero results.

This key and its child keys must be defined in a *.view.bxb file. This file must be in an appropriate locale-specific resources folder or the base folder.

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) Developers' Guide to check if your layout is using the correct components for that moment and that view.

For example, the components you can use in a layout macro for the summary of results (which you define under the where-each block) are different from the components you can define in a layout macro for the details of results (which you define under the main render block). The components you can specify in a highlights are also different than the details of each result.

For more examples of result views, see the Bixby Views sample capsule.

Example

result-view {
match {
Movie (results)
}
message {
if (size(results) == 0) {
template ("#{event(results, 'NoResult')}")
} else {
template ("#{event(results, 'Result')}")
}
}
render {
if (size(results) == 1) {
macro (MOVIE_DETAILS) {
param (movie) {
expression (results)
}
}
}
else-if (size(results) > 1) {
list-of (results) {
navigation-mode {
if ($handsFree) {
read-one {
list-summary {
template ("#{event(results, 'Result')}")
}
page-content {
item-selection-question {
macro (HANDS_FREE_MOVIE_ITEM_SELECTION_QUESTION)
}
overflow-statement {
macro (HANDS_FREE_MOVIE_OVERFLOW_STATEMENT)
}
overflow-question {
macro (HANDS_FREE_MOVIE_OVERFLOW_QUESTION)
}
underflow-statement {
macro (HANDS_FREE_MOVIE_UNDERFLOW_STATEMENT)
}
}
}
}
}
highlights {
select (pick) {
label {
macro (MOVIE_HIGHLIGHT_LABEL)
}
macro (MOVIE_HIGHLIGHT) {
param (movie) {
expression (pick)
}
}
summary {
macro (HANDS_FREE_MOVIE_HIGHLIGHT_SUMMARY) {
param (movie) {
expression (pick)
}
}
}
}
}
where-each (result) {
if ($handsFree) {
macro (MOVIE_HIGHLIGHT) {
param (movie) {
expression (result)
}
}
}
else {
macro (MOVIE_SUMMARY) {
param (movie) {
expression (result)
}
}
}
spoken-summary {
macro (HANDS_FREE_MOVIE_NORMAL_SUMMARY) {
param (movie) {
expression (result)
}
}
}
}
}
}
}
}

View master on GitHub

Child Keys

match
required
Match patterns are used to dynamically look up the appropriate data (layout, dialog, selection strategies, or views) for the current context
app-launch
optional
When triggered by this result-view, exits users from Bixby and opens a client application
capsule-lock
optional
Determines if a result view has capsule lock enabled
conversation-drivers
optional
Provides convenient shortcuts to related actions
followup
optional
Defines a followup, which gives users an opportunity to do a specific follow-up action by responding to a yes or no question
message
optional
Message to display to users
overrides
optional
Specifies overrides for certain behaviors on a per-view basis
refresh
optional
Allows for the results to be periodically refreshed, as long as the UI remains open
render
optional
Renders the specified view for users