The NativeTabbar methods let you use multiple instances of the RhoMobile webview in separate tabs. On Android, iOS and WIndows Phone 8 the tabs are true Native Tabbar controls to give your application a native look and feel.No more than 4 tabs can be created in the Windows Phone 8 tabbar. A tabbar separator doesn't exist in Windows Phone 8. On Windows Mobile/CE there are no visible tabs. Either Tabbar or Toolbar should be used in an application - Tabbar and Toolbar shouldnot be used simultaneously. ## Enabling the API This API is part of the `coreapi` extension that is included automatically. :::ruby extensions: ["coreapi"] ## JavaScript Usage Be sure to review the [JavaScript API Usage](/guide/api_js) guide for important information about using this API in JavaScript. ## Ruby Usage Be sure to review the [Ruby API Usage](/guide/api_ruby) guide for important information about using this API in Ruby. Removes the current tabbar and replaces it with this one. Callback will be called when tab is switched. Whilst the actual number of tabs you can create will depend on the memory available on your device there is an absolute upper limit of 30 tabs in any one application. Array of Tab elements. Properties of Tab elements. Visible label to display on the tabbar. URL to page which will be loaded into tab. Predefined actions are not supported. It may be path to Ruby controller action; i.e. '/app/Account' would load the Account index action. For ruby callback use 'callback:/app/Account' Or javascript method to call: 'javascript: methodOnTab();'. Or path to html page to load. Relative path to tabbar item icon in your application; typically located in /public/images/. Win32, Android, iOS, WP8 When tab is activated - page in tab will be reloaded. Change the selected color of this tab. On Android this works only if you setup selectedColor for all tabs and also setup backgroundColor for the whole Tabbar. This property change background color on Android and _icon's_ color on iOS according to the platform's UI-style specifications. Win32, Android, iOS, WP8 Tab will be displayed as disabled. Win32, Android, iOS, WP8 Background color for tab. Use when your application background color is not white for removing blink during switch tabs. Win32, Android, iOS, WP8 Gives a smooth transfer to a newly opened tab from the current view into this Tab and make this Tab active. Only one Tab can have this parameter. WM, CE, Win32, Android, iOS Sets whether this tab is allowed to be destroyed when a memory limit is reached (Windows Mobile) WM WM Create tab immediately when TabBar is created. Action also will be executed. If false, the tab will be created when it is switched to. Don't use this parameter on the devices with a small amount of RAM. Properties of TabBar. Creates a vertical tabbar on the iPad. iOS Background color of the tabbar. Win32, Android, iOS, WP8 WM Do not display Tabs with labels.Only hiddenTab=true is currently supported. WM Create tabs immediately when TabBar is created. Action also will be executed. If false, then each tab will be created when first switch to the tab is executed. Don't use this parameter on the devices with a small amount of RAM. Android Place TabBar to bottom instead of default top - only for Android. Information about tab changes. New tab index. New tab index. WM New tab index. If you switched to first activated tab, when oldTabIndex will be -1, which means that there was no old tab index exists. WM WM Fires when a tab gains focus. Fires when a new tab cannot be created. Returns the current tab 0-based index. Removes all tabbar except the default tabbar whose index value is 0. Does nothing if there is no active tabbar other than tab 0. Removes the Tab by index. Method will remove the WebView for the specific tab, it will not remove the tab from the tab array, so all indexes will remain the same.You cannot delete the tab with useCurrentViewForTab flag.If you switch to previously removed tab, tab will be recreated. WM The index for tab (index numbered from 0) to delete. Set the iPhone badge to tab. iOS The index for this tab (index numbered from 0). You can also set -1 to select current tab for set badge. String for iPhone badge, such as '12'. Switch active tab. The index for this tab (index numbered from 0). If Tabbar already created. 1.0.0 WM, CE, Win32, Android, iOS, WP8 Please consider the limitations of the device when creating multiple tabs with the Native TabBar. The number of tabs that can be created will depend on the resources of the device and the complexities of the pages displayed in those tabs but, as a general rule, a maximum of 10 tabs on an MC75a should be enforced. Also consider setting the `createOnInit` property to false so that not all tabs are initialized when the TabBar is first created and using the in-process engine for a more responsive experience.
Create a platform-native tabbar. Tabs can link to internal application links (such as those built with "url_for") as well as external URLs. "Home", :action => url_for(Rho::Application.startURI) }, { :label => "example.com", :action => "http://www.example.com", }], {}, url_for(:action => :tabbar_callback) ) end def tabbar_callback Alert.show_popup("Switching to tab #{@params["rab_index"]}") end ]]>
Switch the active tab.
Remove the tabbar.