public class ActionBarImpl.TabImpl extends ActionBar.Tab
INVALID_POSITION| Constructor and Description |
|---|
TabImpl() |
| Modifier and Type | Method and Description |
|---|---|
ActionBar.TabListener |
getCallback() |
CharSequence |
getContentDescription()
Gets a brief description of this tab's content for use in accessibility support.
|
android.view.View |
getCustomView()
Retrieve a previously set custom view for this tab.
|
android.graphics.drawable.Drawable |
getIcon()
Return the icon associated with this tab.
|
int |
getPosition()
Return the current position of this tab in the action bar.
|
Object |
getTag() |
CharSequence |
getText()
Return the text of this tab.
|
void |
select()
Select this tab.
|
ActionBar.Tab |
setContentDescription(CharSequence contentDesc)
Set a description of this tab's content for use in accessibility support.
|
ActionBar.Tab |
setContentDescription(int resId)
Set a description of this tab's content for use in accessibility support.
|
ActionBar.Tab |
setCustomView(int layoutResId)
Set a custom view to be used for this tab.
|
ActionBar.Tab |
setCustomView(android.view.View view)
Set a custom view to be used for this tab.
|
ActionBar.Tab |
setIcon(android.graphics.drawable.Drawable icon)
Set the icon displayed on this tab.
|
ActionBar.Tab |
setIcon(int resId)
Set the icon displayed on this tab.
|
void |
setPosition(int position) |
ActionBar.Tab |
setTabListener(ActionBar.TabListener callback)
Set the
ActionBar.TabListener that will handle switching to and from this tab. |
ActionBar.Tab |
setTag(Object tag)
Give this Tab an arbitrary object to hold for later use.
|
ActionBar.Tab |
setText(CharSequence text)
Set the text displayed on this tab.
|
ActionBar.Tab |
setText(int resId)
Set the text displayed on this tab.
|
public Object getTag()
getTag in class ActionBar.Tabpublic ActionBar.Tab setTag(Object tag)
ActionBar.TabsetTag in class ActionBar.Tabtag - Object to storepublic ActionBar.TabListener getCallback()
public ActionBar.Tab setTabListener(ActionBar.TabListener callback)
ActionBar.TabActionBar.TabListener that will handle switching to and from this tab.
All tabs must have a TabListener set before being added to the ActionBar.setTabListener in class ActionBar.Tabcallback - Listener to handle tab selection eventspublic android.view.View getCustomView()
ActionBar.TabgetCustomView in class ActionBar.TabActionBar.Tab.setCustomView(View).public ActionBar.Tab setCustomView(android.view.View view)
ActionBar.TabActionBar.Tab.setText(CharSequence) and ActionBar.Tab.setIcon(Drawable).setCustomView in class ActionBar.Tabview - Custom view to be used as a tab.public ActionBar.Tab setCustomView(int layoutResId)
ActionBar.TabActionBar.Tab.setText(CharSequence) and ActionBar.Tab.setIcon(Drawable).setCustomView in class ActionBar.TablayoutResId - A layout resource to inflate and use as a custom tab viewpublic android.graphics.drawable.Drawable getIcon()
ActionBar.TabgetIcon in class ActionBar.Tabpublic int getPosition()
ActionBar.TabgetPosition in class ActionBar.TabActionBar.Tab.INVALID_POSITION if this tab is not currently in
the action bar.public void setPosition(int position)
public CharSequence getText()
ActionBar.TabgetText in class ActionBar.Tabpublic ActionBar.Tab setIcon(android.graphics.drawable.Drawable icon)
ActionBar.TabsetIcon in class ActionBar.Tabicon - The drawable to use as an iconpublic ActionBar.Tab setIcon(int resId)
ActionBar.TabsetIcon in class ActionBar.TabresId - Resource ID referring to the drawable to use as an iconpublic ActionBar.Tab setText(CharSequence text)
ActionBar.TabsetText in class ActionBar.Tabtext - The text to displaypublic ActionBar.Tab setText(int resId)
ActionBar.TabsetText in class ActionBar.TabresId - A resource ID referring to the text that should be displayedpublic void select()
ActionBar.Tabselect in class ActionBar.Tabpublic ActionBar.Tab setContentDescription(int resId)
ActionBar.TabsetContentDescription in class ActionBar.TabresId - A resource ID referring to the description textActionBar.Tab.setContentDescription(CharSequence),
ActionBar.Tab.getContentDescription()public ActionBar.Tab setContentDescription(CharSequence contentDesc)
ActionBar.TabsetContentDescription in class ActionBar.TabcontentDesc - Description of this tab's contentActionBar.Tab.setContentDescription(int),
ActionBar.Tab.getContentDescription()public CharSequence getContentDescription()
ActionBar.TabgetContentDescription in class ActionBar.TabActionBar.Tab.setContentDescription(CharSequence),
ActionBar.Tab.setContentDescription(int)Copyright © 2011–2014. All rights reserved.