Dynamic Tab Menu
A default tab menu can be defined in the app configuration and can be overwritten dynamically as required. Alternatively, the configuration can be left blank and all tab menus set by the website. The visibility of the tab menu can also be toggled dynamically at runtime.
↔️Median JavaScript Bridge
Select a tab:
median.tabNavigation.selectTab(1);Note: The tabs are 0-indexed, i.e.
median.tabNavigation.selectTab(1)will select the second tabDeselect all tabs:
median.tabNavigation.deselect();Set/change the tab buttons:
var tabItems = [{ "icon": "fas fa-cloud", //optional "label": "Tab 1", "url": "javascript:alert('You selected tab 1')" }, { "icon": "fas fa-globe", //optional "label": "Tab 2", "url": "javascript:alert('You selected tab 2')" }, { "icon": "fas fa-users", //optional "label": "Tab 3", "url": "javascript:alert('You selected tab 3')" }]; median.tabNavigation.setTabs({'enabled': true, 'items': tabItems});Hide the tab menu:
median.tabNavigation.setTabs({'enabled': false});
Updated 3 months ago
Next Steps