Code example for ActionBar.Tab

Methods: getPosition

0
     * This will cause a navigation event to be delivered to the configured listener. 
     */ 
    @Override 
    public void onTabSelected(Tab tab, FragmentTransaction ft) {
        // TODO Auto-generated method stub 
        mNavListener.onCategorySelected(tab.getPosition());
    } 
 
    /** 
     * Called by framework when a item on the navigation menu is selected. 
     * 
     * This will cause a navigation event to be delivered to the configured listener. 
     */ 
    @Override 
    public boolean onNavigationItemSelected(int itemPosition, long itemId) {
        mNavListener.onCategorySelected(itemPosition);
        return true; 
    } 
 
 
Contextual code suggestions in your IDE  Get Codota for Java