# Titanium.UI.TabGroup

> A tabbed group of windows.

- Source: https://titaniumsdk.com/docs/sdk/13.3.1/Titanium.UI.TabGroup
- Titanium SDK version: 13.3.1
- Kind: view
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 0.9
- Extends: Titanium.UI.Window
- Inheritance: Titanium.UI.Window > Titanium.UI.View > Titanium.Proxy

| Android | iOS |
| ------- | --- |
| ![Android](./tabgroup_android.png) |  |

A tab group can contain one or more [Tab](https://titaniumsdk.com/docs/sdk/Titanium.UI.Tab.md) objects, each of which has an
associated tab control that is used to bring it into focus.

Use the [Titanium.UI.createTabGroup](https://titaniumsdk.com/docs/sdk/Titanium.UI.md#createTabGroup) method or **`<TabGroup>`** Alloy element to create a tab group
that, in turn, contains one or more `<Tab>` elements.

You can add tabs to the group using [addTab](https://titaniumsdk.com/docs/sdk/Titanium.UI.TabGroup.md#addTab), and programmatically
switch to a specific tab using [setActiveTab](https://titaniumsdk.com/docs/sdk/Titanium.UI.TabGroup.md#setActiveTab).

#### Platform Implementation Notes

When using a tab group, note the following differences between platforms:

* The tab group controls are positioned at the top of the display on Android and at the bottom
on iOS.

* On Android, only one tab group may exist at one time. A tab group may be closed to allow a new
one to be opened later, but the root of the application must be a heavyweight window to prevent
it exiting. Tabs cannot be removed from the tab group once added, and tabs cannot be reordered.

* If you use a BottomNavigation on Android with a Material 3 theme you should set `experimental:true`.

* On iOS, more than one tab group may exist, and may be opened and closed as required.
Each tab can contain a stack of windows, and the user can switch between them by tapping the
tab's associated control. Tabs can be removed, and the user may (optionally) be allowed to
reorder tabs.

* On iOS, it is also possible to add tabs by updating the
[tabs](https://titaniumsdk.com/docs/sdk/Titanium.UI.TabGroup.md#tabs) property, and to switch active tabs by setting the
[active](https://titaniumsdk.com/docs/sdk/Titanium.UI.Tab.md#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-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.

#### Further Reading

If using tab groups on iOS, see
[iOS UI Element Usage Guidelines](https://developer.apple.com/ios/human-interface-guidelines/bars/tab-bars/).

## Example: Alloy XML Markup

Default Titanium project as an Alloy view.

``` xml
<Alloy>
    <TabGroup backgroundColor="white" >
        <Tab id="tab1" title="Tab 1" icon="KS_nav_views.png">
            <Window id="win1" title="Tab 1">
                <Label id="label1" color="#999">I am Window 1</Label>
            </Window>
        </Tab>
        <Tab id="tab2" title="Tab 2" icon="KS_nav_views.png">
            <Window id="win2" title="Tab 2">
                <Label id="label2" color="#999">I am Window 2</Label>
            </Window>
        </Tab>
        <!-- Use the Require tag to include external Ti.UI.Tab views -->
    </TabGroup>
</Alloy>
```

## Example: Classic Titanium Example

Simple two-tabbed app.

``` js
var win1 = Ti.UI.createWindow({
    backgroundColor: 'blue',
    title: 'Blue'
});
win1.add(Ti.UI.createLabel({text: 'I am a blue window.'}));

var win2 = Ti.UI.createWindow({
    backgroundColor: 'red',
    title: 'Red'
});
win2.add(Ti.UI.createLabel({text: 'I am a red window.'}));

var tab1 = Ti.UI.createTab({
    window: win1,
    title: 'Blue'
}),
tab2 = Ti.UI.createTab({
    window: win2,
    title: 'Red'
}),
tabGroup = Ti.UI.createTabGroup({
    tabs: [tab1, tab2]
});
tabGroup.open();
```

## Example: Example with different colors

Create a TabGroup with different active and inactive colors.

``` js
function createTab(title, icon) {
  const window = Ti.UI.createWindow({ title: title });
  window.add(Ti.UI.createLabel({ text: title + " View" }));
    const tab = Ti.UI.createTab({
    title: title,
    icon: icon,
    window: window,
  });
  return tab;
}

const tabGroup = Ti.UI.createTabGroup({
  tabs: [
    createTab("Tab 1", "/assets/images/tab1.png"),
    createTab("Tab 2", "/assets/images/tab2.png"),
    createTab("Tab 3", "/assets/images/tab1.png")
  ],
  activeTintColor: "red",
  activeTitleColor: "red",
  tintColor: "purple",
  titleColor: "purple",
  tabsBackgroundColor: "#F7F7F7",
});
tabGroup.open();
```

## Example: BottomNavigation Material3 example

Create a BottomNavigation TabGroup with a Material3 theme using the new layout.

``` js
const win1 = Ti.UI.createWindow();
const win2 = Ti.UI.createWindow();
const tab1 = Ti.UI.createTab({
	window: win1,
	title: 'Tab 1',
	icon: '/images/appicon.png'
});
const tab2 = Ti.UI.createTab({
	window: win2,
	title: 'Tab 2',
	icon: '/images/appicon.png'
});

win1.add(Ti.UI.createLabel({text: "Tab 1 - click to set badge"}));
win2.add(Ti.UI.createLabel({text: "Tab 2"}));
win1.addEventListener("click", function() {
	tab1.badge = 20;
});

const bottomNav = Ti.UI.createTabGroup({
	tabs: [tab1, tab2],
	theme: "Theme.Titanium.Material3.DayNight",
	experimental: true,
	style: Ti.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION
});

bottomNav.open();
```

## Properties

### activeTab

- Type: Number | Titanium.UI.Tab
- Platforms: Android, iPhone, iPad, macOS

Active tab.

### activeTabBackgroundImage

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 3.1.0

Default background image for the active tab.

### activeTabIconTint

- Type: String | Titanium.UI.Color
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 3.1.0
- DEPRECATED since 9.0.3. Deprecated in favor of [Titanium.UI.TabGroup.activeTintColor](Titanium.UI.TabGroup.activeTintColor) or alternatively [Titanium.UI.Tab.activeTintColor](Titanium.UI.Tab.activeTintColor).

Color applied to active tabs icons, as a color name or hex triplet, where the tab's activeIcon was not defined.

For information about color values, see the "Colors" section of [Titanium.UI](https://titaniumsdk.com/docs/sdk/Titanium.UI.md).

### activeTintColor

- Type: String
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 9.0.3
- Default: `null`

The activeTintColor to apply to tabs.

This property affects the tint of selected tab icons.

### activeTitleColor

- Type: String | Titanium.UI.Color
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 9.0.3

Defines the color of the title of tab when it's active.

The color of the title of the tab when it's active.

### activity

- Type: Titanium.Android.Activity
- Platforms: Android
- Since: Titanium SDK 3.0.0
- Permission: read-only

Reference to the Android Activity object associated with this tab group.

An Activity object is not created until the tab group opens.
Before the tab group opens, `activity` refers to an empty JavaScript object.
You can set properties on this object but cannot invoke any Activity methods on it.
Once the tab group opens, the actual Activity object is created,
using any properties set on the JavaScript object. At this point, you can call methods
on the activity and access any properties that are set when the activity is created.

Prior to Release 3.4.0, you can only set properties on the activity after the tab group
opens.

### allowUserCustomization

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Default: `true`

Allow the user to reorder tabs in the tab group using the **Edit** button on the **More**
tab.

Set to `false` to prevent tab reordering.

### autoTabTitle

- Type: Boolean
- Platforms: Android
- Since: Titanium SDK 11.0.0
- Default: `false`

If set to `true` it will automatically set the actionbar title to the current tabs window title.

### barColor

- Type: String | Titanium.UI.Color
- Platforms: Android, iPhone, iPad, macOS

Default navigation bar color (typically for the **More** tab), as a color name or hex triplet.

For information about color values, see the "Colors" section of [Titanium.UI](https://titaniumsdk.com/docs/sdk/Titanium.UI.md).

A value of `transparent` results in a semi-opaque black bar style.

### bottomAccessoryView

- Type: Titanium.UI.View
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 13.0.0
- Requires: iOS 26.0+

View shown as a bottom accessory attached to the tab group.

Adds a custom view as a bottom accessory of the tab group. Available on iOS 26+ only (uses the new iOS tab group accessories).

Note: Label subviews require explicit width and height set to render properly. Be sure to set `width` and `height` on any `Ti.UI.Label` added to this view.

### editButtonTitle

- Type: String
- Platforms: iPhone, iPad, macOS

Title for the edit button on the **More** tab.

### enabled

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 12.7.0
- Default: `true`

Enables or disables the menu in a BottomNavigation. If disabled you can't change to a different tab.

### exitOnClose

- Type: Boolean
- Platforms: Android
- Default: `True if tab group is opened on top of the root activity. False otherwise.`

Boolean value indicating if the application should exit when closing the tab group, whether via Android
back button or the [close](https://titaniumsdk.com/docs/sdk/Titanium.UI.TabGroup.md#close) method.

Starting in 3.4.2 you can set this property at any time. In earlier releases you can only set this as a createTabGroup({...}) option.

### experimental

- Type: Boolean
- Platforms: Android
- Since: Titanium SDK 12.7.0
- Default: `false`

Only used for a BottomNavigation setup. If set to `true` it will use an optimized BottomNavigation
setup with fixes for Material 3 layouts and new properties: `indicatorColor` and `iconFamily`.
The new BottomNavigation will only load the active Activity and doesn't support `swipeable`.

### flags

- Type: Number
- Platforms: Android
- Since: Titanium SDK 12.7.0

Additional flags to set on the TabGroup.

Use [Titanium.UI.Android.STATUS_BAR_LIGHT](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#STATUS_BAR_LIGHT) to set the status bar text color to light mode.

### forceBottomPosition

- Type: Boolean
- Platforms: iPad
- Since: Titanium SDK 13.1.0
- Requires: iOS 18.0+
- Default: `false`

Force tab bar to bottom position.

A new floating tab bar was introduced in iPadOS 18.
It is displayed without tab icons and at the top of the screen.
This property forces the tab bar to be displayed in the old style with icons and at the bottom of the screen (as on iPhone).

### interactiveDismissModeEnabled

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 12.5.0
- Default: `false`
- DEPRECATED since 13.0.0, removed in 13.0.0. This is handled by the operation system in newer versions of iOS.

A boolean indicating whether or not child windows of this tab group
should have the ability to be swipe-to-closed over the full width of it's window or not.

### minimizeBehavior

- Type: Number
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 13.0.0
- Requires: iOS 26.0+

Defines the minimize behavior for the tab group, if it is supported.

Accepts: `Titanium.UI.iOS.TAB_GROUP_MINIMIZE_BEHAVIOR_AUTOMATIC`, `Titanium.UI.iOS.TAB_GROUP_MINIMIZE_BEHAVIOR_NEVER`, `Titanium.UI.iOS.TAB_GROUP_MINIMIZE_BEHAVIOR_ON_SCROLL_DOWN`, `Titanium.UI.iOS.TAB_GROUP_MINIMIZE_BEHAVIOR_ON_SCROLL_UP`

### navTintColor

- Type: String | Titanium.UI.Color
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 3.3.0
- Default: `null`

The tintColor to apply to the navigation bar (typically for the **More** tab).

This property is a direct correspondent of the tintColor property of NavigationBar on iOS.

### paddingBottom

- Type: Number | String
- Platforms: Android
- Since: Titanium SDK 10.1.0

Bottom padding of bottom navigation

When using [TABS_STYLE_BOTTOM_NAVIGATION](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TABS_STYLE_BOTTOM_NAVIGATION) you can set the padding to have
a floating bottom navigation

### paddingLeft

- Type: Number | String
- Platforms: Android
- Since: Titanium SDK 10.1.0

Left padding of bottom navigation

When using [TABS_STYLE_BOTTOM_NAVIGATION](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TABS_STYLE_BOTTOM_NAVIGATION) you can set the padding to have
a floating bottom navigation

### paddingRight

- Type: Number | String
- Platforms: Android
- Since: Titanium SDK 10.1.0

Right padding of bottom navigation

When using [TABS_STYLE_BOTTOM_NAVIGATION](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TABS_STYLE_BOTTOM_NAVIGATION) you can set the padding to have
a floating bottom navigation

### shadowImage

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 3.1.0

Image of the shadow placed between the tab group and the content area.

The [Titanium.UI.TabGroup.tabsBackgroundImage](https://titaniumsdk.com/docs/sdk/Titanium.UI.TabGroup.md#tabsBackgroundImage) property must also be set
in order for this to take effect.

### shiftMode

- Type: Number
- Platforms: Android
- Since: Titanium SDK 8.0.0
- Default: `1`

Determines whether the [TABS_STYLE_BOTTOM_NAVIGATION](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TABS_STYLE_BOTTOM_NAVIGATION) uses shiftMode.

In Android BottomNavigationView uses shiftMode by default. This mode changes
unselected tabs' properties - makes the title invisible and reduces the icon's
dimensions by half.

This property allows the user to choose whether they would use this design
behavior.

Default is 1 (true) to show title only when the tab is selected. Selected tab will be bigger.
Set it to 0 (false) to show all titles and make the buttons the same size.
Set it to 2 hide all titles and make the buttons the same size. Title stays hidden for active tabs.

NOTE: This property only affects TabGroups with the [TABS_STYLE_BOTTOM_NAVIGATION](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TABS_STYLE_BOTTOM_NAVIGATION).

### smoothScrollOnTabClick

- Type: Boolean
- Platforms: Android
- Since: Titanium SDK 3.6.0
- Default: `true`

Boolean value indicating if changing pages by tab clicks is animated.

If true, when clicking the tab the page transition is animated, false otherwise.

### statusBarColor

- Type: Number
- Platforms: Android
- Since: Titanium SDK 12.7.0

The color of the status bar (top bar) for this window.

### style

- Type: Number
- Platforms: Android
- Since: Titanium SDK 8.0.0

Property defining which style for the TabGroup to be used.

Since 8.0.0 Titanium has introduce a new style to be used for the TabGroup component.

For backwards compatibility not taking advantage of this property results in using the default style
which is similar to the ActionBar Tabs style but sticking to the Material design Guidelines.

[TABS_STYLE_BOTTOM_DEFAULT](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TABS_STYLE_DEFAULT) is the style that was used in Titanium
prior to 8.0.0.GA. It displays the TabGroup with a list of Tabs at the top of the screen.

[TABS_STYLE_BOTTOM_NAVIGATION](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TABS_STYLE_BOTTOM_NAVIGATION) is a style that displays
the TabGroup with a list of Tabs in a controller at the bottom of the screen. The recommended usage of this
style is for items count between three and five: (https://material.io/design/components/bottom-navigation.html#usage)
In Android it is limited to supporting a maximum number of five tabs.
You can use paddingLeft, paddingRight, paddingBottom to create a floating bottom navigation. If you want to change the
radius or background color you'll need to create `/app/platform/android/res/drawable/titanium_rounded_corners.xml` and set it to
```xml
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#FFFFFF" />
    <corners android:radius="7dp" />
</shape>
```

Accepts: `Titanium.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION`, `Titanium.UI.Android.TABS_STYLE_DEFAULT`

### swipeable

- Type: Boolean
- Platforms: Android
- Since: Titanium SDK 3.6.0
- Default: `true`

Boolean value indicating if tab navigation can be done by swipes, in addition to tab clicks.

On Android, the tabs may be selected by swipes, in addition to clicks. This property may be set at
tab group creation, or any time later as long as the tab navigation is not disabled.

### tabBarVisible

- Type: Boolean
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 12.1.0
- Default: `true`

Programmatically shows / hides the bottom tab group of the tab group.

This method also updates iOS 18+ [Elevated Tab Bar on iPad](https://developer.apple.com/documentation/uikit/elevating-your-ipad-app-with-a-tab-bar-and-sidebar).
Notes: Animation effect is applied on iOS <= 17, but will be removed in SDK 13.0.0.

### tabMode

- Type: Number
- Platforms: Android
- Since: Titanium SDK 12.2.0

Property defining which tabMode is used for the TabGroup.

Sets the style of the TabGroup tabs.

[TAB_MODE_SCROLLABLE](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TAB_MODE_SCROLLABLE) is the best style for showing long tab titles and
enables horizontal scrolling (default).

[TAB_MODE_FIXED](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TAB_MODE_FIXED) will show all tabs at once.

Accepts: `Titanium.UI.Android.TAB_MODE_FIXED`, `Titanium.UI.Android.TAB_MODE_SCROLLABLE`

### tabs

- Type: Array<Titanium.UI.Tab>
- Platforms: Android, iPhone, iPad, macOS

Tabs managed by the tab group.

### tabsBackgroundColor

- Type: String | Titanium.UI.Color
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 3.0.0

Default background color for inactive tabs, as a color name or hex triplet.

For information about color values, see the "Colors" section of [Titanium.UI](https://titaniumsdk.com/docs/sdk/Titanium.UI.md).

A tab's [backgroundColor](https://titaniumsdk.com/docs/sdk/Titanium.UI.Tab.md#backgroundColor) property takes precedence if set.

This property applies to all states and tabs, not just inactive tabs. Furthermore, the inactive
tab icons without activeIcon will be tinted this color.

### tabsBackgroundImage

- Type: String
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 3.1.0

Default background image for tabs.

### tabsBackgroundSelectedColor

- Type: String
- Platforms: Android
- Since: Titanium SDK 3.0.0

Default background selected color for tabs, as a color name or hex triplet.

For information about color values, see the "Colors" section of [Titanium.UI](https://titaniumsdk.com/docs/sdk/Titanium.UI.md).

This property is only supported by
[TABS_STYLE_BOTTOM_NAVIGATION](https://titaniumsdk.com/docs/sdk/Titanium.UI.Android.md#TABS_STYLE_BOTTOM_NAVIGATION).

A tab's [backgroundFocusedColor](https://titaniumsdk.com/docs/sdk/Titanium.UI.Tab.md#backgroundFocusedColor) property takes
precedence if set.

### tabsTintColor

- Type: String | Titanium.UI.Color
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 3.1.3
- Default: `null`
- DEPRECATED since 9.0.3. Deprecated in favor of [Titanium.UI.TabGroup.tintColor](Titanium.UI.TabGroup.tintColor) or alternatively [Titanium.UI.Tab.tintColor](Titanium.UI.Tab.tintColor).

The tintColor to apply to the tabs.

This property is a direct correspondent of the tintColor property of UITabBar on iOS. This effects the
title and icons rendered in the active tab. When not specified the active icons are tinted with a bright
blue.

### tabsTranslucent

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.2.0
- Default: `true`

A Boolean value that indicates whether the tab group is translucent.

When the value of this property is `true`, the tab group adds a translucent effect to its background
image or tint color. When translucency is enabled, part of the tab group's underlying content is able
to show through, although the amount that shows through depends on the rest of the tab group configuration.
For example, a background image can wholly or partially obscure the background content. Setting this
property to NO causes the tab group to render its bar tint color or background image on top of an opaque backdrop.

The default value of this property is dependent on the configuration of the tab group:
  * The default value is `true` when the tab group does not have a custom background image.
  * The default value is `true` when a custom background image contains any transparency - that is,
    at least one pixel has an alpha value of less than 1.0.
  * The default value is `false` when the custom background image is completely opaque - that is,
    all pixels have an alpha value of 1.0.

### tintColor

- Type: String
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 9.0.3
- Default: `null`

The tintColor to apply to tabs.

This property affects the tint of unselected tab icons.

### title

- Type: String
- Platforms: Android
- Since: Titanium SDK 3.3.0

Title for this tabGroup.

### titleAttributes

- Type: titleAttributesParams
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 3.3.0

Title text attributes of the window to be applied on the **More** tab.

Use this property to specify the color, font and shadow attributes of the title.

### titleColor

- Type: String | Titanium.UI.Color
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 9.0.3

Defines the color of the title of tab when it's inactive.

The color of the title of the tab when it's inactive.

### translucent

- Type: Boolean
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 3.3.0
- Default: `true on iOS 7 and above, false otherwise.`

Boolean value indicating if the nav bar (typically for the **More** tab), is translucent.

### unselectedItemTintColor

- Type: String | Titanium.UI.Color
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 6.1.0
- DEPRECATED since 9.0.3. Deprecated in favor of [Titanium.UI.TabGroup.tintColor](Titanium.UI.TabGroup.tintColor) or alternatively [Titanium.UI.Tab.tintColor](Titanium.UI.Tab.tintColor).

Unselected items in this tab group will be tinted with this color. Setting this value to null
indicates that the tab group should use its default value instead.

For information about color values, see the "Colors" section of [Titanium.UI](https://titaniumsdk.com/docs/sdk/Titanium.UI.md).

### windowSoftInputMode

- Type: Number
- Platforms: Android

Determines how the tab group is treated when a soft input method (such as a virtual keyboard)
is displayed.

For more information see the official Android API Reference,
[Window.setSoftInputMode](https://developer.android.com/reference/android/view/Window.html#setSoftInputMode(int)).

Accepts: `Titanium.UI.Android.SOFT_INPUT_ADJUST_NOTHING`, `Titanium.UI.Android.SOFT_INPUT_ADJUST_PAN`, `Titanium.UI.Android.SOFT_INPUT_ADJUST_RESIZE`, `Titanium.UI.Android.SOFT_INPUT_ADJUST_UNSPECIFIED`

## Methods

### addTab

- Platforms: Android, iPhone, iPad, macOS

Adds a tab to the tab group.

Parameters:

- `tab` (Titanium.UI.Tab): Tab to add.

### close

- Platforms: Android, iPhone, iPad, macOS

Closes the tab group and removes it from the UI.

### disableTabNavigation

- Platforms: Android
- Since: Titanium SDK 3.6.0
- DEPRECATED since 12.7.0.

Disable (or re-enable) tab navigation. If tab navigation is disabled, the tabs are hidden and
the last selected tab window is shown.

Parameters:

- `params` (disableTabOptions): Boolean to disable tab navigation or dictionary (since 12.1.0).

### getActiveTab

- Platforms: Android, iPhone, iPad, macOS
- DEPRECATED since 10.0.0, removed in 10.0.0. Use the <Titanium.UI.TabGroup.activeTab> property instead.

Gets the currently-active tab.

Returns: Titanium.UI.Tab

### getTabs

- Platforms: Android, iPhone, iPad, macOS
- DEPRECATED since 10.0.0, removed in 10.0.0. Use the <Titanium.UI.TabGroup.tabs> property instead.

Gets all tabs that are managed by the tab group.

Returns: Array<Titanium.UI.Tab>

### hideTabBar

- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 12.7.0

Hides the tab group with animation.

This method also updates iOS 18+ [Elevated Tab Bar on iPad](https://developer.apple.com/documentation/uikit/elevating-your-ipad-app-with-a-tab-bar-and-sidebar).
To hide tab group without animation, set [tabBarVisible](https://titaniumsdk.com/docs/sdk/Titanium.UI.TabGroup.md#tabBarVisible) property to `true`.

### open

- Platforms: Android, iPhone, iPad, macOS

Opens the tab group and makes it visible.

### removeTab

- Platforms: iPhone, iPad, macOS

Removes a tab from the tab group.

Parameters:

- `tab` (Titanium.UI.Tab): Tab to remove.

### setActiveTab

- Platforms: Android, iPhone, iPad, macOS
- DEPRECATED since 10.0.0, removed in 10.0.0. Use the <Titanium.UI.TabGroup.activeTab> property instead.

Selects the currently active tab in a tab group.

Parameters:

- `indexOrObject` (Number | Titanium.UI.Tab): Index or object of the tab to switch to.

### showTabBar

- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 12.7.0

Shows the tab group with animation.

This method also updates iOS 18+ [Elevated Tab Bar on iPad](https://developer.apple.com/documentation/uikit/elevating-your-ipad-app-with-a-tab-bar-and-sidebar).
To show tab group without animation, set [tabBarVisible](https://titaniumsdk.com/docs/sdk/Titanium.UI.TabGroup.md#tabBarVisible) property to `false`.

## Events

### androidback

- Platforms: Android
- Since: Titanium SDK 3.0.0

Fired when the back button is pressed by the user.

This event is fired when the current tab group's activity detects
a back button press by the user to navigate back.

By default this event would trigger the current activity to be finished
and removed from the task stack. Subscribing to this event with a listener
will prevent the default behavior. To finish the activity from your listener
just call the `close` method of the tab group.

### androidcamera

- Platforms: Android
- Since: Titanium SDK 3.0.0

Fired when the Camera button is released.

Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.

### androidfocus

- Platforms: Android
- Since: Titanium SDK 3.0.0

Fired when the Camera button is half-pressed then released.

Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.

### androidsearch

- Platforms: Android
- Since: Titanium SDK 3.0.0

Fired when the Search button is released.

Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.

### androidvoldown

- Platforms: Android
- Since: Titanium SDK 3.0.0

Fired when the volume down button is released.

Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.

### androidvolup

- Platforms: Android
- Since: Titanium SDK 3.0.0

Fired when the volume up button is released.

Setting a listener disables the default key handling for this button. To restore
default behavior, remove the listener.

### blur

- Platforms: Android, iPhone, iPad, macOS

Fired when this tab group loses focus. On Android, fired when a tab in this tab group
loses focus.

On Android, this event also fires before putting the activity in the background
(before the activity enters the pause state).

Event properties:

- `index` (Number): Index of the current active tab. On iOS, a value of `undefined` indicates that the **More** tab was the active tab.
- `previousIndex` (Number): Index of the previous active tab. On iOS, a value of `undefined` indicates that the **More** tab was the previous tab.
- `tab` (Titanium.UI.Tab): Active tab.
- `previousTab` (Titanium.UI.Tab): Previous active tab. On iOS, a value of `undefined` indicates that the **More** tab was the previous tab.

### close

- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 7.1.0

Fired when the tab group is closed.

### focus

- Platforms: Android, iPhone, iPad, macOS

Fired when this tab group gains focus. On Android, fired when a tab in this tab group
gains focus.

On Android, this event also fires when the activity enters the foreground
(after the activity enters the resume state).

Event properties:

- `index` (Number): Index of the current active tab.
- `previousIndex` (Number): Index of the previous active tab.
- `tab` (Titanium.UI.Tab): Active tab.
- `previousTab` (Titanium.UI.Tab): Previous active tab.

### open

- Platforms: Android, iPhone, iPad, macOS

Fired when the tab group is opened.

## Inherited members

113 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/13.3.1/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `lifecycleContainer`, `removeEventListener`
- [Titanium.UI.View](https://titaniumsdk.com/docs/sdk/13.3.1/Titanium.UI.View.md): `accessibilityDisableLongPress`, `animate`, `center`, `clearMotionEffects`, `clipMode`, `convertPointToView`, `elevation`, `filterTouchesWhenObscured`, `getViewById`, `hiddenBehavior`, `hide`, `horizontalMotionEffect`, `id`, `insertAt`, `keepHardwareMode`, `keepScreenOn`, `overrideCurrentAnimation`, `previewContext`, `pullBackgroundColor`, `rect`, `rotate`, `rotation`, `rotationX`, `rotationY`, `scaleX`, `scaleY`, `show`, `size`, `stopAnimation`, `toImage`, `tooltip`, `touchEnabled`, `touchFeedback`, `touchFeedbackColor`, `transitionName`, `translationX`, `translationY`, `translationZ`, `verticalMotionEffect`, `viewShadowColor`, `viewShadowOffset`, `viewShadowRadius`, `visible`
- [Titanium.UI.Window](https://titaniumsdk.com/docs/sdk/13.3.1/Titanium.UI.Window.md): `activityEnterTransition`, `activityExitTransition`, `activityReenterTransition`, `activityReturnTransition`, `activitySharedElementEnterTransition`, `activitySharedElementExitTransition`, `activitySharedElementReenterTransition`, `activitySharedElementReturnTransition`, `addSharedElement`, `autoAdjustScrollViewInsets`, `backButtonTitle`, `backButtonTitleImage`, `backgroundColor`, `barImage`, `closed`, `extendEdges`, `extendSafeArea`, `flagSecure`, `focused`, `fullscreen`, `hideNavBar`, `hideShadow`, `hideToolbar`, `hidesBackButton`, `hidesBarsOnSwipe`, `hidesBarsOnTap`, `hidesBarsWhenKeyboardAppears`, `hidesSearchBarWhenScrolling`, `homeIndicatorAutoHidden`, `includeOpaqueBars`, `largeTitleDisplayMode`, `largeTitleEnabled`, `leftNavButton`, `leftNavButtons`, `modal`, `navBarColor`, `navBarHidden`, `navigationWindow`, `onBack`, `orientation`, `orientationModes`, `removeAllSharedElements`, `rightNavButton`, `rightNavButtons`, `safeAreaPadding`, `showNavBar`, `showToolbar`, `splitActionBar`, `statusBarStyle`, `sustainedPerformanceMode`, `swipeToClose`, `tabBarHidden`, `theme`, `titleControl`, `titleImage`, `titlePrompt`, `titleid`, `titlepromptid`, `toolbar`, `transitionAnimation`, `uiFlags`, `windowFlags`, `windowPixelFormat`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

