Home | History | Annotate | Download | only in app

Lines Matching refs:Tab

76      * Tab navigation mode. Instead of static title text this mode
499 * Create and return a new {@link Tab}.
500 * This tab will not be included in the action bar until it is added.
508 * @return A new Tab
510 * @see #addTab(Tab)
512 public abstract Tab newTab();
515 * Add a tab for use in tabbed navigation mode. The tab will be added at the end of the list.
516 * If this is the first tab to be added it will become the selected tab.
518 * @param tab Tab to add
520 public abstract void addTab(Tab tab);
523 * Add a tab for use in tabbed navigation mode. The tab will be added at the end of the list.
525 * @param tab Tab to add
526 * @param setSelected True if the added tab should become the selected tab.
528 public abstract void addTab(Tab tab, boolean setSelected);
531 * Add a tab for use in tabbed navigation mode. The tab will be inserted at
532 * <code>position</code>. If this is the first tab to be added it will become
533 * the selected tab.
535 * @param tab The tab to add
536 * @param position The new position of the tab
538 public abstract void addTab(Tab tab, int position);
541 * Add a tab for use in tabbed navigation mode. The tab will be insterted at
544 * @param tab The tab to add
545 * @param position The new position of the tab
546 * @param setSelected True if the added tab should become the selected tab.
548 public abstract void addTab(Tab tab, int position, boolean setSelected);
551 * Remove a tab from the action bar. If the removed tab was selected it will be deselected
552 * and another tab will be selected if present.
554 * @param tab The tab to remove
556 public abstract void removeTab(Tab tab);
559 * Remove a tab from the action bar. If the removed tab was selected it will be deselected
560 * and another tab will be selected if present.
562 * @param position Position of the tab to remove
567 * Remove all tabs from the action bar and deselect the current tab.
572 * Select the specified tab. If it is not a child of this action bar it will be added.
576 * @param tab Tab to select
578 public abstract void selectTab(Tab tab);
581 * Returns the currently selected tab if in tabbed navigation mode and there is at least
582 * one tab present.
584 * @return The currently selected tab or null
586 public abstract Tab getSelectedTab();
589 * Returns the tab at the specified index.
594 public abstract Tab getTabAt(int index);
598 * @return Tab count
713 * A tab in the action bar.
717 public static abstract class Tab {
719 * An invalid position for a tab.
726 * Return the current position of this tab in the action bar.
728 * @return Current position, or {@link #INVALID_POSITION} if this tab is not currently in
734 * Return the icon associated with this tab.
736 * @return The tab's icon
741 * Return the text of this tab.
743 * @return The tab's text
748 * Set the icon displayed on this tab.
753 public abstract Tab setIcon(Drawable icon);
756 * Set the icon displayed on this tab.
761 public abstract Tab setIcon(int resId);
764 * Set the text displayed on this tab. Text may be truncated if there is not
770 public abstract Tab setText(CharSequence text);
773 * Set the text displayed on this tab. Text may be truncated if there is not
779 public abstract Tab setText(int resId);
782 * Set a custom view to be used for this tab. This overrides values set by
785 * @param view Custom view to be used as a tab.
788 public abstract Tab setCustomView(View view);
791 * Set a custom view to be used for this tab. This overrides values set by
794 * @param layoutResId A layout resource to inflate and use as a custom tab view
797 public abstract Tab setCustomView(int layoutResId);
800 * Retrieve a previously set custom view for this tab.
807 * Give this Tab an arbitrary object to hold for later use.
812 public abstract Tab setTag(Object obj);
815 * @return This Tab's tag object.
820 * Set the {@link TabListener} that will handle switching to and from this tab.
823 * @param listener Listener to handle tab selection events
826 public abstract Tab setTabListener(TabListener listener);
829 * Select this tab. Only valid if the tab has been added to the action bar.
834 * Set a description of this tab's content for use in accessibility support.
842 public abstract Tab setContentDescription(int resId);
845 * Set a description of this tab's content for use in accessibility support.
848 * @param contentDesc Description of this tab's content
853 public abstract Tab setContentDescription(CharSequence contentDesc);
856 * Gets a brief description of this tab's content for use in accessibility support.
858 * @return Description of this tab's content
866 * Callback interface invoked when a tab is focused, unfocused, added, or removed.
870 * Called when a tab enters the selected state.
872 * @param tab The tab that was selected
874 * during a tab switch. The previous tab's unselect and this tab's select will be
878 public void onTabSelected(Tab tab, FragmentTransaction ft);
881 * Called when a tab exits the selected state.
883 * @param tab The tab that was unselected
885 * during a tab switch. This tab's unselect and the newly selected tab's select
889 public void onTabUnselected(Tab tab, FragmentTransaction ft);
892 * Called when a tab that is already selected is chosen again by the user.
895 * @param tab The tab that was reselected.
900 public void onTabReselected(Tab tab, FragmentTransaction ft);