|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.actionbarsherlock.app.ActionBar.Tab
public abstract static class ActionBar.Tab
A tab in the action bar.
Tabs manage the hiding and showing of Fragments.
| Field Summary | |
|---|---|
static int |
INVALID_POSITION
An invalid position for a tab. |
| Constructor Summary | |
|---|---|
ActionBar.Tab()
|
|
| Method Summary | |
|---|---|
abstract CharSequence |
getContentDescription()
Gets a brief description of this tab's content for use in accessibility support. |
abstract android.view.View |
getCustomView()
Retrieve a previously set custom view for this tab. |
abstract android.graphics.drawable.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(CharSequence contentDesc)
Set a description of this tab's content for use in accessibility support. |
abstract ActionBar.Tab |
setContentDescription(int resId)
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(android.view.View view)
Set a custom view to be used for this tab. |
abstract ActionBar.Tab |
setIcon(android.graphics.drawable.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 ActionBar.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(CharSequence text)
Set the text displayed on this tab. |
abstract ActionBar.Tab |
setText(int resId)
Set the text displayed on this tab. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INVALID_POSITION
getPosition(),
Constant Field Values| Constructor Detail |
|---|
public ActionBar.Tab()
| Method Detail |
|---|
public abstract int getPosition()
INVALID_POSITION if this tab is not currently in
the action bar.public abstract android.graphics.drawable.Drawable getIcon()
public abstract CharSequence getText()
public abstract ActionBar.Tab setIcon(android.graphics.drawable.Drawable icon)
icon - The drawable to use as an icon
public abstract ActionBar.Tab setIcon(int resId)
resId - Resource ID referring to the drawable to use as an icon
public abstract ActionBar.Tab setText(CharSequence text)
text - The text to display
public abstract ActionBar.Tab setText(int resId)
resId - A resource ID referring to the text that should be displayed
public abstract ActionBar.Tab setCustomView(android.view.View view)
setText(CharSequence) and setIcon(Drawable).
view - Custom view to be used as a tab.
public abstract ActionBar.Tab setCustomView(int layoutResId)
setText(CharSequence) and setIcon(Drawable).
layoutResId - A layout resource to inflate and use as a custom tab view
public abstract android.view.View getCustomView()
setCustomView(View).public abstract ActionBar.Tab setTag(Object obj)
obj - Object to store
public abstract Object getTag()
public abstract ActionBar.Tab setTabListener(ActionBar.TabListener listener)
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
public abstract void select()
public abstract ActionBar.Tab setContentDescription(int resId)
resId - A resource ID referring to the description text
setContentDescription(CharSequence),
getContentDescription()public abstract ActionBar.Tab setContentDescription(CharSequence contentDesc)
contentDesc - Description of this tab's content
setContentDescription(int),
getContentDescription()public abstract CharSequence getContentDescription()
setContentDescription(CharSequence),
setContentDescription(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||