Home | History | Annotate | Download | only in photo
      1 package com.android.ex.photo;
      2 
      3 import android.graphics.drawable.Drawable;
      4 import androidx.annotation.Nullable;
      5 
      6 
      7 /**
      8  * Wrapper activity for an action bar. This wraps either a {@link android.app.ActionBar} or
      9  * {@link androidx.appcompat.app.ActionBar}.
     10  */
     11 public interface ActionBarInterface {
     12 
     13     public interface OnMenuVisibilityListener {
     14         /**
     15          * Called when an action bar menu is shown or hidden. Applications may want to use
     16          * this to tune auto-hiding behavior for the action bar or pause/resume video playback,
     17          * gameplay, or other activity within the main content area.
     18          *
     19          * @param isVisible True if an action bar menu is now visible, false if no action bar
     20          *                  menus are visible.
     21          */
     22         public void onMenuVisibilityChanged(boolean isVisible);
     23     }
     24 
     25     public void setDisplayHomeAsUpEnabled(boolean showHomeAsUp);
     26 
     27     public void addOnMenuVisibilityListener(OnMenuVisibilityListener listener);
     28 
     29     /**
     30      * Wrapper for {@code setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE,
     31      * ActionBar.DISPLAY_SHOW_TITLE)}.
     32      */
     33     public void setDisplayOptionsShowTitle();
     34 
     35     @Nullable
     36     public CharSequence getTitle();
     37 
     38     public void setTitle(@Nullable CharSequence title);
     39 
     40     public void setSubtitle(@Nullable CharSequence subtitle);
     41 
     42     public void show();
     43 
     44     public void hide();
     45 
     46     public void setLogo(@Nullable Drawable logo);
     47 }
     48