com.android.ide.common.rendering.api
Class ActionBarCallback

java.lang.Object
  extended by com.android.ide.common.rendering.api.ActionBarCallback

public class ActionBarCallback
extends java.lang.Object

Callback for Action Bar information needed by the Layout Library.


Nested Class Summary
static class ActionBarCallback.HomeButtonStyle
          Types of navigation for home button.
 
Field Summary
protected static java.lang.String ATTR_MENU
           
protected static java.lang.String ATTR_NAV_MODE
           
static int NAVIGATION_MODE_LIST
           
static int NAVIGATION_MODE_STANDARD
           
static int NAVIGATION_MODE_TABS
           
protected static java.lang.String VALUE_NAV_MODE_LIST
           
protected static java.lang.String VALUE_NAV_MODE_TABS
           
 
Constructor Summary
ActionBarCallback()
           
 
Method Summary
 ActionBarCallback.HomeButtonStyle getHomeButtonStyle()
          Returns the type of navigation for home button to be used in the action bar.
 java.util.List<java.lang.String> getMenuIdNames()
          Returns a list of names of the IDs for menus to add to the action bar.
 int getNavigationMode()
          Returns which navigation mode the action bar should use.
 boolean getSplitActionBarWhenNarrow()
          Returns whether the Action Bar should be split for narrow screens.
 java.lang.String getSubTitle()
          Returns the subtitle to be used with the action bar or null if there is no subtitle.
 boolean isOverflowPopupNeeded()
          Returns whether to draw the overflow menu popup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAVIGATION_MODE_STANDARD

public static final int NAVIGATION_MODE_STANDARD
See Also:
Constant Field Values

NAVIGATION_MODE_LIST

public static final int NAVIGATION_MODE_LIST
See Also:
Constant Field Values

NAVIGATION_MODE_TABS

public static final int NAVIGATION_MODE_TABS
See Also:
Constant Field Values

ATTR_MENU

protected static final java.lang.String ATTR_MENU
See Also:
Constant Field Values

ATTR_NAV_MODE

protected static final java.lang.String ATTR_NAV_MODE
See Also:
Constant Field Values

VALUE_NAV_MODE_TABS

protected static final java.lang.String VALUE_NAV_MODE_TABS
See Also:
Constant Field Values

VALUE_NAV_MODE_LIST

protected static final java.lang.String VALUE_NAV_MODE_LIST
See Also:
Constant Field Values
Constructor Detail

ActionBarCallback

public ActionBarCallback()
Method Detail

getMenuIdNames

public java.util.List<java.lang.String> getMenuIdNames()
Returns a list of names of the IDs for menus to add to the action bar.

Returns:
the list of menu ids. The list is never null, but may be empty.

getSplitActionBarWhenNarrow

public boolean getSplitActionBarWhenNarrow()
Returns whether the Action Bar should be split for narrow screens.


getNavigationMode

public int getNavigationMode()
Returns which navigation mode the action bar should use.

Returns:
one of NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST or NAVIGATION_MODE_TABS

getSubTitle

public java.lang.String getSubTitle()
Returns the subtitle to be used with the action bar or null if there is no subtitle.


getHomeButtonStyle

public ActionBarCallback.HomeButtonStyle getHomeButtonStyle()
Returns the type of navigation for home button to be used in the action bar.

For example, for showHomeAsUp, an arrow is shown alongside the "home" icon.

Returns:
navigation type for home button. Never null.

isOverflowPopupNeeded

public boolean isOverflowPopupNeeded()
Returns whether to draw the overflow menu popup.