DecorContentParent.java revision 8e10080c914d1ad0784394fa3026b85535535847
1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18package android.support.v7.widget;
19
20import static android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP;
21
22import android.graphics.drawable.Drawable;
23import android.os.Parcelable;
24import android.support.annotation.RestrictTo;
25import android.support.v7.view.menu.MenuPresenter;
26import android.util.SparseArray;
27import android.view.Menu;
28import android.view.Window;
29
30/**
31 * Implemented by the top-level decor layout for a window. DecorContentParent offers
32 * entry points for a number of title/window decor features.
33 *
34 * @hide
35 */
36@RestrictTo(LIBRARY_GROUP)
37public interface DecorContentParent {
38    void setWindowCallback(Window.Callback cb);
39    void setWindowTitle(CharSequence title);
40    CharSequence getTitle();
41    void initFeature(int windowFeature);
42    void setUiOptions(int uiOptions);
43    boolean hasIcon();
44    boolean hasLogo();
45    void setIcon(int resId);
46    void setIcon(Drawable d);
47    void setLogo(int resId);
48    boolean canShowOverflowMenu();
49    boolean isOverflowMenuShowing();
50    boolean isOverflowMenuShowPending();
51    boolean showOverflowMenu();
52    boolean hideOverflowMenu();
53    void setMenuPrepared();
54    void setMenu(Menu menu, MenuPresenter.Callback cb);
55    void saveToolbarHierarchyState(SparseArray<Parcelable> toolbarStates);
56    void restoreToolbarHierarchyState(SparseArray<Parcelable> toolbarStates);
57    void dismissPopups();
58
59}