# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Ctors | Methods | Inherited Methods

# ActionBar.Tab

`public static abstract class ActionBar.Tab`
`extends Object` ``

java.lang.Object
↳ | android.app.ActionBar.Tab

This class is deprecated.
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other common navigation patterns instead.

A tab in the action bar.

Tabs manage the hiding and showing of `Fragment`s.

## Summary

### Constants
`int` | `INVALID_POSITION` An invalid position for a tab.

### Public constructors
`Tab()`

### Public methods
`abstract CharSequence` | `getContentDescription()` Gets a brief description of this tab's content for use in accessibility support.
`abstract View` | `getCustomView()` Retrieve a previously set custom view for this tab.
`abstract Drawable` | `getIcon()` Return the icon associated with this tab.
`abstract int` | `getPosition()` Return the current position of this tab in the action bar.
`abstract Object` | `getTag()`
`abstract CharSequence` | `getText()` Return the text of this tab.
`abstract void` | `select()` Select this tab.
`abstract ActionBar.Tab` | `setContentDescription(int resId)` Set a description of this tab's content for use in accessibility support.
`abstract ActionBar.Tab` | `setContentDescription(CharSequence contentDesc)` Set a description of this tab's content for use in accessibility support.
`abstract ActionBar.Tab` | `setCustomView(int layoutResId)` Set a custom view to be used for this tab.
`abstract ActionBar.Tab` | `setCustomView(View view)` Set a custom view to be used for this tab.
`abstract ActionBar.Tab` | `setIcon(Drawable icon)` Set the icon displayed on this tab.
`abstract ActionBar.Tab` | `setIcon(int resId)` Set the icon displayed on this tab.
`abstract ActionBar.Tab` | `setTabListener(ActionBar.TabListener listener)` Set the `TabListener` that will handle switching to and from this tab.
`abstract ActionBar.Tab` | `setTag(Object obj)` Give this Tab an arbitrary object to hold for later use.
`abstract ActionBar.Tab` | `setText(int resId)` Set the text displayed on this tab.
`abstract ActionBar.Tab` | `setText(CharSequence text)` Set the text displayed on this tab.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### INVALID_POSITION

    public static final int INVALID_POSITION

An invalid position for a tab.

See also:

- `getPosition()`

Constant Value: -1 (0xffffffff)

## Public constructors

### Tab

    public Tab ()

## Public methods

### getContentDescription

    public abstract CharSequence getContentDescription ()

Gets a brief description of this tab's content for use in accessibility support.

Returns
`CharSequence` | Description of this tab's content

See also:

- `setContentDescription(CharSequence)`
- `setContentDescription(int)`

### getCustomView

    public abstract View getCustomView ()

Retrieve a previously set custom view for this tab.

Returns
`View` | The custom view set by `setCustomView(android.view.View)`.

### getIcon

    public abstract Drawable getIcon ()

Return the icon associated with this tab.

Returns
`Drawable` | The tab's icon

### getPosition

    public abstract int getPosition ()

Return the current position of this tab in the action bar.

Returns
`int` | Current position, or `INVALID_POSITION` if this tab is not currently in the action bar.

### getTag

    public abstract Object getTag ()

Returns
`Object` | This Tab's tag object.

### getText

    public abstract CharSequence getText ()

Return the text of this tab.

Returns
`CharSequence` | The tab's text

### select

    public abstract void select ()

Select this tab. Only valid if the tab has been added to the action bar.

### setContentDescription

    public abstract ActionBar.Tab setContentDescription (int resId)

Set a description of this tab's content for use in accessibility support. If no content description is provided the title will be used.

Parameters
`resId` | `int`: A resource ID referring to the description text

Returns
`ActionBar.Tab` | The current instance for call chaining

See also:

- `setContentDescription(CharSequence)`
- `getContentDescription()`

### setContentDescription

    public abstract ActionBar.Tab setContentDescription (CharSequence contentDesc)

Set a description of this tab's content for use in accessibility support. If no content description is provided the title will be used.

Parameters
`contentDesc` | `CharSequence`: Description of this tab's content

Returns
`ActionBar.Tab` | The current instance for call chaining

See also:

- `setContentDescription(int)`
- `getContentDescription()`

### setCustomView

    public abstract ActionBar.Tab setCustomView (int layoutResId)

Set a custom view to be used for this tab. This overrides values set by `setText(java.lang.CharSequence)` and `setIcon(android.graphics.drawable.Drawable)`.

Parameters
`layoutResId` | `int`: A layout resource to inflate and use as a custom tab view

Returns
`ActionBar.Tab` | The current instance for call chaining

### setCustomView

    public abstract ActionBar.Tab setCustomView (View view)

Set a custom view to be used for this tab. This overrides values set by `setText(java.lang.CharSequence)` and `setIcon(android.graphics.drawable.Drawable)`.

Parameters
`view` | `View`: Custom view to be used as a tab.

Returns
`ActionBar.Tab` | The current instance for call chaining

### setIcon

    public abstract ActionBar.Tab setIcon (Drawable icon)

Set the icon displayed on this tab.

Parameters
`icon` | `Drawable`: The drawable to use as an icon

Returns
`ActionBar.Tab` | The current instance for call chaining

### setIcon

    public abstract ActionBar.Tab setIcon (int resId)

Set the icon displayed on this tab.

Parameters
`resId` | `int`: Resource ID referring to the drawable to use as an icon

Returns
`ActionBar.Tab` | The current instance for call chaining

### setTabListener

    public abstract ActionBar.Tab setTabListener (ActionBar.TabListener listener)

Set the `TabListener` that will handle switching to and from this tab. All tabs must have a TabListener set before being added to the ActionBar.

Parameters
`listener` | `ActionBar.TabListener`: Listener to handle tab selection events

Returns
`ActionBar.Tab` | The current instance for call chaining

### setTag

    public abstract ActionBar.Tab setTag (Object obj)

Give this Tab an arbitrary object to hold for later use.

Parameters
`obj` | `Object`: Object to store

Returns
`ActionBar.Tab` | The current instance for call chaining

### setText

    public abstract ActionBar.Tab setText (int resId)

Set the text displayed on this tab. Text may be truncated if there is not room to display the entire string.

Parameters
`resId` | `int`: A resource ID referring to the text that should be displayed

Returns
`ActionBar.Tab` | The current instance for call chaining

### setText

    public abstract ActionBar.Tab setText (CharSequence text)

Set the text displayed on this tab. Text may be truncated if there is not room to display the entire string.

Parameters
`text` | `CharSequence`: The text to display

Returns
`ActionBar.Tab` | The current instance for call chaining

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*