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