toggleTopbar()

toggleTopbar(newState?: boolean)

Toggles the application topbar visibility state (which includes the logo and tile mode switcher).

If the topbar is currently shown, then it will be hidden. And vice-versa -> if the topbar is currently hidden, then it will be shown. There is also an optional param to set a concrete target visibility state, but you may use hideTopbar() and showTopbar() to achieve similar functionality.

//This will toggle the topbar visibility state
sambaFrame.toggleTopbar();

//This will show the topbar, equivalent to sambaFrame.showTopbar();
sambaFrame.toggleTopbar(true); 

//This will hide the topbar, equivalent to sambaFrame.hideTopbar();
sambaFrame.toggleTopbar(false);

Sample use case: You may have a button in your application to control the topbar visibility.

Last updated