com.actionbarsherlock.internal.app
Class ActionBarImpl.TabImpl

java.lang.Object
  extended by com.actionbarsherlock.app.ActionBar.Tab
      extended by com.actionbarsherlock.internal.app.ActionBarImpl.TabImpl
Enclosing class:
ActionBarImpl

public class ActionBarImpl.TabImpl
extends ActionBar.Tab


Field Summary
 
Fields inherited from class com.actionbarsherlock.app.ActionBar.Tab
INVALID_POSITION
 
Constructor Summary
ActionBarImpl.TabImpl()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionBarImpl.TabImpl

public ActionBarImpl.TabImpl()
Method Detail

getTag

public Object getTag()
Specified by:
getTag in class ActionBar.Tab
Returns:
This Tab's tag object.

setTag

public ActionBar.Tab setTag(Object tag)
Description copied from class: ActionBar.Tab
Give this Tab an arbitrary object to hold for later use.

Specified by:
setTag in class ActionBar.Tab
Parameters:
tag - Object to store
Returns:
The current instance for call chaining

getCallback

public ActionBar.TabListener getCallback()

setTabListener

public ActionBar.Tab setTabListener(ActionBar.TabListener callback)
Description copied from class: ActionBar.Tab
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.

Specified by:
setTabListener in class ActionBar.Tab
Parameters:
callback - Listener to handle tab selection events
Returns:
The current instance for call chaining

getCustomView

public android.view.View getCustomView()
Description copied from class: ActionBar.Tab
Retrieve a previously set custom view for this tab.

Specified by:
getCustomView in class ActionBar.Tab
Returns:
The custom view set by ActionBar.Tab.setCustomView(View).

setCustomView

public ActionBar.Tab setCustomView(android.view.View view)
Description copied from class: ActionBar.Tab
Set a custom view to be used for this tab. This overrides values set by ActionBar.Tab.setText(CharSequence) and ActionBar.Tab.setIcon(Drawable).

Specified by:
setCustomView in class ActionBar.Tab
Parameters:
view - Custom view to be used as a tab.
Returns:
The current instance for call chaining

setCustomView

public ActionBar.Tab setCustomView(int layoutResId)
Description copied from class: ActionBar.Tab
Set a custom view to be used for this tab. This overrides values set by ActionBar.Tab.setText(CharSequence) and ActionBar.Tab.setIcon(Drawable).

Specified by:
setCustomView in class ActionBar.Tab
Parameters:
layoutResId - A layout resource to inflate and use as a custom tab view
Returns:
The current instance for call chaining

getIcon

public android.graphics.drawable.Drawable getIcon()
Description copied from class: ActionBar.Tab
Return the icon associated with this tab.

Specified by:
getIcon in class ActionBar.Tab
Returns:
The tab's icon

getPosition

public int getPosition()
Description copied from class: ActionBar.Tab
Return the current position of this tab in the action bar.

Specified by:
getPosition in class ActionBar.Tab
Returns:
Current position, or ActionBar.Tab.INVALID_POSITION if this tab is not currently in the action bar.

setPosition

public void setPosition(int position)

getText

public CharSequence getText()
Description copied from class: ActionBar.Tab
Return the text of this tab.

Specified by:
getText in class ActionBar.Tab
Returns:
The tab's text

setIcon

public ActionBar.Tab setIcon(android.graphics.drawable.Drawable icon)
Description copied from class: ActionBar.Tab
Set the icon displayed on this tab.

Specified by:
setIcon in class ActionBar.Tab
Parameters:
icon - The drawable to use as an icon
Returns:
The current instance for call chaining

setIcon

public ActionBar.Tab setIcon(int resId)
Description copied from class: ActionBar.Tab
Set the icon displayed on this tab.

Specified by:
setIcon in class ActionBar.Tab
Parameters:
resId - Resource ID referring to the drawable to use as an icon
Returns:
The current instance for call chaining

setText

public ActionBar.Tab setText(CharSequence text)
Description copied from class: ActionBar.Tab
Set the text displayed on this tab. Text may be truncated if there is not room to display the entire string.

Specified by:
setText in class ActionBar.Tab
Parameters:
text - The text to display
Returns:
The current instance for call chaining

setText

public ActionBar.Tab setText(int resId)
Description copied from class: ActionBar.Tab
Set the text displayed on this tab. Text may be truncated if there is not room to display the entire string.

Specified by:
setText in class ActionBar.Tab
Parameters:
resId - A resource ID referring to the text that should be displayed
Returns:
The current instance for call chaining

select

public void select()
Description copied from class: ActionBar.Tab
Select this tab. Only valid if the tab has been added to the action bar.

Specified by:
select in class ActionBar.Tab

setContentDescription

public ActionBar.Tab setContentDescription(int resId)
Description copied from class: ActionBar.Tab
Set a description of this tab's content for use in accessibility support. If no content description is provided the title will be used.

Specified by:
setContentDescription in class ActionBar.Tab
Parameters:
resId - A resource ID referring to the description text
Returns:
The current instance for call chaining
See Also:
ActionBar.Tab.setContentDescription(CharSequence), ActionBar.Tab.getContentDescription()

setContentDescription

public ActionBar.Tab setContentDescription(CharSequence contentDesc)
Description copied from class: ActionBar.Tab
Set a description of this tab's content for use in accessibility support. If no content description is provided the title will be used.

Specified by:
setContentDescription in class ActionBar.Tab
Parameters:
contentDesc - Description of this tab's content
Returns:
The current instance for call chaining
See Also:
ActionBar.Tab.setContentDescription(int), ActionBar.Tab.getContentDescription()

getContentDescription

public CharSequence getContentDescription()
Description copied from class: ActionBar.Tab
Gets a brief description of this tab's content for use in accessibility support.

Specified by:
getContentDescription in class ActionBar.Tab
Returns:
Description of this tab's content
See Also:
ActionBar.Tab.setContentDescription(CharSequence), ActionBar.Tab.setContentDescription(int)


Copyright © 2012-2013. All Rights Reserved.