makes the component visible
force | boolean | when set to true, the command will show not only the current view but all the parent views as well (can be used for nested tabviews or nested mutliviews) |
animation | boolean | enables/disables animation during view showing (details below) |
// default
$$("list").show();
// without animation
$$("list").show(false, false);
This method helps showing the views that are hidden with:
To show a view initially, you can also set the hidden parameter in the view constructor to true.
Performance tip
With standard views (not windows), instead of the hide and show method calls, you can include views into ui.multiview and use its API to manage view visibility.
The second parameter of show() works only for the views that are included into Multiview. Note that the animate setting of Multiview must not be disabled.
1. A view is shown with the animation, defined for Multiview ("slide" by default)
cells:[
{ id:"some", /* view config */ }
]
// ...
$$("some").show();
// same as above
$$("some").show(false, true);
2. A view is shown without animation, while animation is enabled or disabled in Multiview
cells:[
{ id:"some", /* view config */ }
]
// ...
$$("some").show(false, false);
Related sample: Multiview: Showing Cells with and Without animation
3. Animation for a view is different from Multiview animation
{ type:"flip", subtype:"vertical" }
)cells:[
{ id:"some", animate:{ type:"flip", subtype:"vertical" } }
]
// ... with the flip animation
$$("some").show();
// ... without animation
$$("some").show(false, false);
Related sample: Multiview: Redefining Animation Type for Cells