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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | INVALID_POSITION | An invalid position for a tab. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets a brief description of this tab's content for use in accessibility support.
| |||||||||||
Retrieve a previously set custom view for this tab.
| |||||||||||
Return the icon associated with this tab.
| |||||||||||
Return the current position of this tab in the action bar.
| |||||||||||
Return the text of this tab.
| |||||||||||
Select this tab.
| |||||||||||
Set a description of this tab's content for use in accessibility support.
| |||||||||||
Set a description of this tab's content for use in accessibility support.
| |||||||||||
Set a custom view to be used for this tab.
| |||||||||||
Set a custom view to be used for this tab.
| |||||||||||
Set the icon displayed on this tab.
| |||||||||||
Set the icon displayed on this tab.
| |||||||||||
Set the
ActionBar.TabListener that will handle switching to and from this tab. | |||||||||||
Give this Tab an arbitrary object to hold for later use.
| |||||||||||
Set the text displayed on this tab.
| |||||||||||
Set the text displayed on this tab.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Gets a brief description of this tab's content for use in accessibility support.
Retrieve a previously set custom view for this tab.
setCustomView(View)
.
Return the icon associated with this tab.
Return the current position of this tab in the action bar.
INVALID_POSITION
if this tab is not currently in
the action bar.
Return the text of this tab.
Select this tab. Only valid if the tab has been added to the action bar.
Set a description of this tab's content for use in accessibility support. If no content description is provided the title will be used.
resId | A resource ID referring to the description text |
---|
Set a description of this tab's content for use in accessibility support. If no content description is provided the title will be used.
contentDesc | Description of this tab's content |
---|
Set a custom view to be used for this tab. This overrides values set by
setText(CharSequence)
and setIcon(Drawable)
.
layoutResId | A layout resource to inflate and use as a custom tab view |
---|
Set a custom view to be used for this tab. This overrides values set by
setText(CharSequence)
and setIcon(Drawable)
.
view | Custom view to be used as a tab. |
---|
Set the icon displayed on this tab.
icon | The drawable to use as an icon |
---|
Set the icon displayed on this tab.
resId | Resource ID referring to the drawable to use as an icon |
---|
Set the ActionBar.TabListener
that will handle switching to and from this tab.
All tabs must have a TabListener set before being added to the ActionBar.
listener | Listener to handle tab selection events |
---|
Give this Tab an arbitrary object to hold for later use.
obj | Object to store |
---|
Set the text displayed on this tab. Text may be truncated if there is not room to display the entire string.
resId | A resource ID referring to the text that should be displayed |
---|
Set the text displayed on this tab. Text may be truncated if there is not room to display the entire string.
text | The text to display |
---|