java.lang.Object | |
↳ | android.support.v7.app.ActionBar.Tab |
A tab in the action bar that manages the hiding and showing of
Fragment
s.
Note:
This class is included in the
support library
for compatibility
with API level 7 and higher. If you're developing your app for API level 11 and higher
only
, you should instead use the framework
ActionBar.Tab
class.
For information about how to use action bar tabs, read the Action Bar API guide.
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.
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 |
---|