예제 #1
0
  /**
   * Retrieves the String resource ID of the currently selected navigation tab.
   *
   * @return the String resource ID of the selected {@link ActionBar.Tab}, else {@code 0} if no
   *     navigation tabs are available
   * @since 1.1.0
   */
  protected int getSelectedTab() {

    ActionBar actionBar = getActionBar();
    return (actionBar != null && actionBar.getNavigationItemCount() > 0)
        ? navigationResourceIds[(Integer) actionBar.getSelectedNavigationIndex()]
        : 0;
  }
 @Override
 public int getNavigationItemCount() {
   return mActionBar.getNavigationItemCount();
 }