Example usage for android.support.v4.app ActionBar getSelectedTab

List of usage examples for android.support.v4.app ActionBar getSelectedTab

Introduction

In this page you can find the example usage for android.support.v4.app ActionBar getSelectedTab.

Prototype

public abstract ActionBar.Tab getSelectedTab();

Source Link

Document

Returns the currently selected tab if in tabbed navigation mode and there is at least one tab present.

Usage

From source file:com.actionbarsherlock.sample.hcgallery.MainActivity.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    ActionBar bar = getSupportActionBar();
    int category = bar.getSelectedTab().getPosition();
    outState.putInt("category", category);
    outState.putInt("theme", mThemeId);
}