Class ToolbarSherlock



  • public class ToolbarSherlock
    extends java.lang.Object
    Helper for detecting the presence of an ActionBar.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ToolbarSherlock() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void installToolBar(AppCompatActivity activity)
      Ensures that there is an ActionBar available in the AppCompatActivity that was passed in as argument.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ToolbarSherlock

        public ToolbarSherlock()
    • Method Detail

      • installToolBar

        public static void installToolBar(AppCompatActivity activity)
        Ensures that there is an ActionBar available in the AppCompatActivity that was passed in as argument.

        If the Activity's theme has an ActionBar it will be used. In case that the Activity uses a theme without an ActionBar, ToolbarSherlock looks for a Toolbar. If ToolbarSherlock finds a Toolbar, it will install it by calling AppCompatActivity#setSupportActionBar(Toolbar).

        Every AppCompatActivity that uses ToolbarSherlock must include the layout <include layout="@layout/zendesk_toolbar" />.

        Parameters:
        activity - The AppCompatActivity, ToolbarSherlock should take care about.