| Platform | Since |
|---|---|
| Android | 0.9 |
| iPhone | 0.9 |
| iPad | 0.9 |
| Mobile Web | 1.8 |
A tabbed group of windows.
The Tab Group allows you to manage a tabbed UI of one or more windows.
Use the Titanium.UI.createTabGroup method to create a tab group.
A tab group can contain one or more Tab objects, each of which has an associated tab button and a stack of windows. The user can switch between tabs by tapping a tab button.
You can add tabs to the group using addTab, and switch active tabs by calling setActiveTab.
When using a tab group, note the following differences between platforms:
On Android, tabs cannot be removed from the tab group once added, and the tabs cannot be reordered.
On iOS, tabs can be removed, and the user may (optionally) be allowed to reorder tabs.
On iOS and Mobile Web, it is also possible to add tabs by updating the
tabs property, and to switch active tabs by setting
the active property on one of the tabs to true. Since
these mechanisms are platform-specific, it is recommended that you use addTab
and setActiveTab instead.
If you use the iOS/Mobile Web-specific mechanisms, it is possible to add multiple active tabs to a tab group. In this case, the result of which tab is initially selected is undefined.
| Name | Summary |
|---|---|
| add |
Adds a child to this view's hierarchy. |
| addEventListener |
Adds the specified callback as an event listener for the named event. |
| addTab |
Adds a tab to the tab group. |
| animate |
Animates this view. |
| close |
Closes the tab group and removes it from the UI. |
| convertPointToView |
Translates a point from this view's coordinate system to another view's coordinate system. (Android, iPhone, iPad only.) |
| fireEvent |
Fires a synthesized event to any registered listeners. |
| getActiveTab |
Gets the value of the activeTab property. |
| getActiveTabBackgroundColor |
Gets the value of the activeTabBackgroundColor property. (Android, Mobile Web only.) |
| getActiveTabBackgroundDisabledColor |
Gets the value of the activeTabBackgroundDisabledColor property. (Android, Mobile Web only.) |
| getActiveTabBackgroundDisabledImage |
Gets the value of the activeTabBackgroundDisabledImage property. (Android, Mobile Web only.) |
| getActiveTabBackgroundFocusedColor |
Gets the value of the activeTabBackgroundFocusedColor property. (Android, Mobile Web only.) |
| getActiveTabBackgroundFocusedImage |
Gets the value of the activeTabBackgroundFocusedImage property. (Android, Mobile Web only.) |
| getActiveTabBackgroundImage |
Gets the value of the activeTabBackgroundImage property. (Android, Mobile Web only.) |
| getActiveTabBackgroundSelectedColor |
Gets the value of the activeTabBackgroundSelectedColor property. (Android, Mobile Web only.) |
| getActiveTabBackgroundSelectedImage |
Gets the value of the activeTabBackgroundSelectedImage property. (Android, Mobile Web only.) |
| getAllowUserCustomization |
Gets the value of the allowUserCustomization property. (iPhone, iPad only.) |
| getAnchorPoint |
Gets the value of the anchorPoint property. (iPhone, iPad only.) |
| getAnimatedCenterPoint |
Gets the value of the animatedCenterPoint property. (Android, iPhone, iPad only.) |
| getBackgroundColor |
Gets the value of the backgroundColor property. |
| getBackgroundDisabledColor |
Gets the value of the backgroundDisabledColor property. (Android only.) |
| getBackgroundDisabledImage |
Gets the value of the backgroundDisabledImage property. (Android only.) |
| getBackgroundFocusedColor |
Gets the value of the backgroundFocusedColor property. (Android only.) |
| getBackgroundFocusedImage |
Gets the value of the backgroundFocusedImage property. (Android only.) |
| getBackgroundGradient |
Gets the value of the backgroundGradient property. (iPhone, iPad, Mobile Web only.) |
| getBackgroundImage |
Gets the value of the backgroundImage property. |
| getBackgroundLeftCap |
Gets the value of the backgroundLeftCap property. (iPhone, iPad only.) |
| getBackgroundRepeat |
Gets the value of the backgroundRepeat property. (iPhone, iPad only.) |
| getBackgroundSelectedColor |
Gets the value of the backgroundSelectedColor property. (Android, Mobile Web only.) |
| getBackgroundSelectedImage |
Gets the value of the backgroundSelectedImage property. (Android, Mobile Web only.) |
| getBackgroundTopCap |
Gets the value of the backgroundTopCap property. (iPhone, iPad only.) |
| getBarColor |
Gets the value of the barColor property. (iPhone, iPad only.) |
| getBorderColor |
Gets the value of the borderColor property. |
| getBorderRadius |
Gets the value of the borderRadius property. |
| getBorderWidth |
Gets the value of the borderWidth property. |
| getBottom |
Gets the value of the bottom property. |
| getCenter |
Gets the value of the center property. |
| getChildren |
Gets the value of the children property. |
| getEditButtonTitle |
Gets the value of the editButtonTitle property. (iPhone, iPad only.) |
| getFocusable |
Gets the value of the focusable property. (Android only.) |
| getHeight |
Gets the value of the height property. |
| getKeepScreenOn |
Gets the value of the keepScreenOn property. (Android only.) |
| getLayout |
Gets the value of the layout property. |
| getLeft |
Gets the value of the left property. |
| getOpacity |
Gets the value of the opacity property. |
| getRight |
Gets the value of the right property. |
| getSize |
Gets the value of the size property. |
| getSoftKeyboardOnFocus |
Gets the value of the softKeyboardOnFocus property. (Android only.) |
| getTabDividerColor |
Gets the value of the tabDividerColor property. (Android, Mobile Web only.) |
| getTabDividerWidth |
Gets the value of the tabDividerWidth property. (Android, Mobile Web only.) |
| getTabHeight |
Gets the value of the tabHeight property. (Mobile Web only.) |
| getTabs |
Returns an array of tab objects that are managed by the tab group. |
| getTabsBackgroundColor |
Gets the value of the tabsBackgroundColor property. (Android, Mobile Web only.) |
| getTabsBackgroundDisabledColor |
Gets the value of the tabsBackgroundDisabledColor property. (Android, Mobile Web only.) |
| getTabsBackgroundDisabledImage |
Gets the value of the tabsBackgroundDisabledImage property. (Android, Mobile Web only.) |
| getTabsBackgroundFocusedColor |
Gets the value of the tabsBackgroundFocusedColor property. (Android, Mobile Web only.) |
| getTabsBackgroundFocusedImage |
Gets the value of the tabsBackgroundFocusedImage property. (Android, Mobile Web only.) |
| getTabsBackgroundImage |
Gets the value of the tabsBackgroundImage property. (Android, Mobile Web only.) |
| getTabsBackgroundSelectedColor |
Gets the value of the tabsBackgroundSelectedColor property. (Android, Mobile Web only.) |
| getTabsBackgroundSelectedImage |
Gets the value of the tabsBackgroundSelectedImage property. (Android, Mobile Web only.) |
| getTop |
Gets the value of the top property. |
| getTouchEnabled |
Gets the value of the touchEnabled property. |
| getTransform |
Gets the value of the transform property. |
| getVisible |
Gets the value of the visible property. |
| getWidth |
Gets the value of the width property. |
| getWindowSoftInputMode |
Gets the value of the windowSoftInputMode property. (Android only.) |
| getZIndex |
Gets the value of the zIndex property. |
| hide |
Hides this view. |
| open |
Opens the tab group and makes it visible. |
| remove |
Removes a child view from this view's hierarchy. |
| removeEventListener |
Removes the specified callback as an event listener for the named event. |
| removeTab |
Removes a tab from the tab group. (iPhone, iPad, Mobile Web only.) |
| setActiveTab |
Selects the currently active tab in a tab group. |
| setActiveTabBackgroundColor |
Sets the value of the activeTabBackgroundColor property. (Android, Mobile Web only.) |
| setActiveTabBackgroundDisabledColor |
Sets the value of the activeTabBackgroundDisabledColor property. (Android, Mobile Web only.) |
| setActiveTabBackgroundDisabledImage |
Sets the value of the activeTabBackgroundDisabledImage property. (Android, Mobile Web only.) |
| setActiveTabBackgroundFocusedColor |
Sets the value of the activeTabBackgroundFocusedColor property. (Android, Mobile Web only.) |
| setActiveTabBackgroundFocusedImage |
Sets the value of the activeTabBackgroundFocusedImage property. (Android, Mobile Web only.) |
| setActiveTabBackgroundImage |
Sets the value of the activeTabBackgroundImage property. (Android, Mobile Web only.) |
| setActiveTabBackgroundSelectedColor |
Sets the value of the activeTabBackgroundSelectedColor property. (Android, Mobile Web only.) |
| setActiveTabBackgroundSelectedImage |
Sets the value of the activeTabBackgroundSelectedImage property. (Android, Mobile Web only.) |
| setAllowUserCustomization |
Sets the value of the allowUserCustomization property. (iPhone, iPad only.) |
| setAnchorPoint |
Sets the value of the anchorPoint property. (iPhone, iPad only.) |
| setBackgroundColor |
Sets the value of the backgroundColor property. |
| setBackgroundDisabledColor |
Sets the value of the backgroundDisabledColor property. (Android only.) |
| setBackgroundDisabledImage |
Sets the value of the backgroundDisabledImage property. (Android only.) |
| setBackgroundFocusedColor |
Sets the value of the backgroundFocusedColor property. (Android only.) |
| setBackgroundFocusedImage |
Sets the value of the backgroundFocusedImage property. (Android only.) |
| setBackgroundGradient |
Sets the value of the backgroundGradient property. (iPhone, iPad, Mobile Web only.) |
| setBackgroundImage |
Sets the value of the backgroundImage property. |
| setBackgroundLeftCap |
Sets the value of the backgroundLeftCap property. (iPhone, iPad only.) |
| setBackgroundRepeat |
Sets the value of the backgroundRepeat property. (iPhone, iPad only.) |
| setBackgroundSelectedColor |
Sets the value of the backgroundSelectedColor property. (Android, Mobile Web only.) |
| setBackgroundSelectedImage |
Sets the value of the backgroundSelectedImage property. (Android, Mobile Web only.) |
| setBackgroundTopCap |
Sets the value of the backgroundTopCap property. (iPhone, iPad only.) |
| setBarColor |
Sets the value of the barColor property. (iPhone, iPad only.) |
| setBorderColor |
Sets the value of the borderColor property. |
| setBorderRadius |
Sets the value of the borderRadius property. |
| setBorderWidth |
Sets the value of the borderWidth property. |
| setBottom |
Sets the value of the bottom property. |
| setCenter |
Sets the value of the center property. |
| setEditButtonTitle |
Sets the value of the editButtonTitle property. (iPhone, iPad only.) |
| setFocusable |
Sets the value of the focusable property. (Android only.) |
| setHeight |
Sets the value of the height property. |
| setKeepScreenOn |
Sets the value of the keepScreenOn property. (Android only.) |
| setLayout |
Sets the value of the layout property. |
| setLeft |
Sets the value of the left property. |
| setOpacity |
Sets the value of the opacity property. |
| setRight |
Sets the value of the right property. |
| setSoftKeyboardOnFocus |
Sets the value of the softKeyboardOnFocus property. (Android only.) |
| setTabDividerColor |
Sets the value of the tabDividerColor property. (Android, Mobile Web only.) |
| setTabDividerWidth |
Sets the value of the tabDividerWidth property. (Android, Mobile Web only.) |
| setTabHeight |
Sets the value of the tabHeight property. (Mobile Web only.) |
| setTabs |
Sets the value of the tabs property. (iPhone, iPad only.) |
| setTabsBackgroundColor |
Sets the value of the tabsBackgroundColor property. (Android, Mobile Web only.) |
| setTabsBackgroundDisabledColor |
Sets the value of the tabsBackgroundDisabledColor property. (Android, Mobile Web only.) |
| setTabsBackgroundDisabledImage |
Sets the value of the tabsBackgroundDisabledImage property. (Android, Mobile Web only.) |
| setTabsBackgroundFocusedColor |
Sets the value of the tabsBackgroundFocusedColor property. (Android, Mobile Web only.) |
| setTabsBackgroundFocusedImage |
Sets the value of the tabsBackgroundFocusedImage property. (Android, Mobile Web only.) |
| setTabsBackgroundImage |
Sets the value of the tabsBackgroundImage property. (Android, Mobile Web only.) |
| setTabsBackgroundSelectedColor |
Sets the value of the tabsBackgroundSelectedColor property. (Android, Mobile Web only.) |
| setTabsBackgroundSelectedImage |
Sets the value of the tabsBackgroundSelectedImage property. (Android, Mobile Web only.) |
| setTop |
Sets the value of the top property. |
| setTouchEnabled |
Sets the value of the touchEnabled property. |
| setTransform |
Sets the value of the transform property. |
| setVisible |
Sets the value of the visible property. |
| setWidth |
Sets the value of the width property. |
| setZIndex |
Sets the value of the zIndex property. |
| show |
Makes this view visible. |
| toImage |
Returns an image of the rendered view, as a Blob. (Android, iPhone, iPad only.) |
| Name | Type | Summary |
|---|---|---|
| activeTab | Titanium.UI.Tab |
Active tab. |
| activeTabBackgroundColor | String |
The default background color for the active tab. If backgroundColor is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| activeTabBackgroundDisabledColor | String |
The default background disabled color for the active tab. If backgroundDisabledColor is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| activeTabBackgroundDisabledImage | String |
The default background disabled image for the active tab. If backgroundDisabledImage is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| activeTabBackgroundFocusedColor | String |
The default background focused color for the active tab. If backgroundFocusedColor is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| activeTabBackgroundFocusedImage | String |
The default background focused image for the active tab. If backgroundFocusedImage is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| activeTabBackgroundImage | String |
The default background image for the active tab. If backgroundImage is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| activeTabBackgroundSelectedColor | String |
The default background selected color for the active tab. If backgroundSelectedColor is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| activeTabBackgroundSelectedImage | String |
The default background selected image for the active tab. If backgroundSelectedImage is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| allowUserCustomization | Boolean |
Set to |
| anchorPoint | Point |
Anchor point where animation should occur, relative to the view's boundaries. (iPhone, iPad only.) |
| animatedCenterPoint | Point |
Current position of the view during an animation. (Android, iPhone, iPad only.) read-only |
| backgroundColor | String |
Background color of the view. |
| backgroundDisabledColor | String |
Disabled background color of the view. (Android only.) |
| backgroundDisabledImage | String |
Disabled background image for the view, specified as a local file path or URL. (Android only.) |
| backgroundFocusedColor | String |
Focused background color of the view. (Android only.) |
| backgroundFocusedImage | String |
Focused background image for the view, specified as a local file path or URL. (Android only.) |
| backgroundGradient | Gradient |
A background gradient for the view. (iPhone, iPad, Mobile Web only.) |
| backgroundImage | String |
Background image for the view, specified as a local file path or URL. |
| backgroundLeftCap | Number |
Size of the left end cap. (iPhone, iPad only.) |
| backgroundRepeat | Boolean |
Toggle for whether or not to tile a background across a view. (iPhone, iPad only.) |
| backgroundSelectedColor | String |
Selected background color of the view. (Android, Mobile Web only.) |
| backgroundSelectedImage | String |
Selected background image url for the view, specified as a local file path or URL. (Android, Mobile Web only.) |
| backgroundTopCap | Number |
Size of the top end cap. (iPhone, iPad only.) |
| barColor | String |
Default navigation bar color (typically for the More tab). (iPhone, iPad only.) |
| borderColor | String |
Border color of the view. |
| borderRadius | Number |
Border radius of the view. |
| borderWidth | Number |
Border width of the view. |
| bottom | Number or String |
View's bottom position, in platform-specific units. |
| center | Point |
View's center position, in the parent view's coordinates. |
| children | Array<Titanium.UI.View> |
Array of this view's child views. read-only |
| editButtonTitle | String |
Title for the edit button on the More tab. (iPhone, iPad only.) |
| focusable | Boolean |
Whether view should be focusable while navigating with the trackball. (Android only.) |
| height | Number or String |
View height, in platform-specific units. |
| keepScreenOn | Boolean |
Whether to keep the device screen on. (Android only.) |
| layout | String |
Specifies how the view positions its children. One of: 'absolute', 'vertical', or 'horizontal'. |
| left | Number or String |
View's left position, in platform-specific units. |
| opacity | Number |
Opacity of this view, from 0.0 (transparent) to 1.0 (opaque). |
| right | Number or String |
View's right position, in platform-specific units. |
| size | Object |
Rendered size of the view as a dictionary of width and height properties. read-only |
| softKeyboardOnFocus | Number |
Determines keyboard behavior when this view is focused. (Android only.) |
| tabDividerColor | String |
The color of the divider between tabs (Android, Mobile Web only.) |
| tabDividerWidth | Number or String |
The width of the divider between tabs. (Android, Mobile Web only.) |
| tabHeight | Number or String |
The height of the tabs. (Mobile Web only.) |
| tabs | Array<Titanium.UI.Tab> |
Array of tab objects that are managed by the tab group. This property is not supported across all platforms: use getTabs instead. (iPhone, iPad only.) |
| tabsBackgroundColor | String |
The default background color for tabs. If backgroundColor is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| tabsBackgroundDisabledColor | String |
The default background disabled color for tabs. If backgroundDisabledColor is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| tabsBackgroundDisabledImage | String |
The default background disabled image for tabs. If backgroundDisabledImage is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| tabsBackgroundFocusedColor | String |
The default background focused color for tabs. If backgroundFocusedColor is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| tabsBackgroundFocusedImage | String |
The default background focused image for tabs. If backgroundFocusedImage is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| tabsBackgroundImage | String |
The default background image for tabs. If backgroundImage is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| tabsBackgroundSelectedColor | String |
The default background selected color for tabs. If backgroundSelectedColor is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| tabsBackgroundSelectedImage | String |
The default background selected image for tabs. If backgroundSelectedImage is explicitly set on an individual tab, that value takes precidence. (Android, Mobile Web only.) |
| top | Number or String |
The view's top position. |
| touchEnabled | Boolean |
Whether view should receive touch events. |
| transform | Titanium.UI.2DMatrix or Titanium.UI.iOS.3DMatrix |
Transformation matrix to apply to the view. |
| visible | Boolean |
Boolean value indicating whether the view is visible. |
| width | Number or String |
View's width, in platform-specific units. |
| windowSoftInputMode | Number |
Determines how the tab group is treated when a soft input method (such as a virtual keyboard) is displayed. One of SOFT_INPUT_ADJUST_PAN, SOFT_INPUT_ADJUST_RESIZE, or SOFT_INPUT_ADJUST_UNSPECIFIED. For more information see the Android API Reference: Window.setSoftInputMode. (Android only.) creation |
| zIndex | Number |
Z index position relative to other sibling views. |
| Name | Summary |
|---|---|
| blur |
Fired when the tab group loses focus. |
| click |
Fired when the device detects a click against the view. |
| close |
Fired when the tab group is closed. |
| dblclick |
Fired when the device detects a double click against the view. |
| doubletap |
Fired when the device detects a double tap against the view. (Android, iPhone, iPad only.) |
| focus |
Fired when the tab group gains focus. |
| longclick |
Fired when the device detects a long click. (Android only.) |
| longpress |
Fired when the device detects a long press. (Android, iPhone, iPad only.) |
| open |
fired when the tab group is opened |
| pinch |
Fired when the device detects a pinch gesture. (iPhone, iPad only.) |
| singletap |
Fired when the device detects a single tap against the view. |
| swipe |
Fired when the device detects a swipe gesture (left or right) against the view. (iPhone, iPad, Mobile Web only.) |
| touchcancel |
Fired when a touch event is interrupted by the device. |
| touchend |
Fired when a touch event is completed. |
| touchmove |
Fired as soon as the device detects movement of a touch. |
| touchstart |
Fired as soon as the device detects a touch gesture. |
| twofingertap |
Fired when the device detects a two-finger tap against the view. |