1/*
2 * Copyright (C) 2013 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
17package android.support.v4.view;
18
19import android.view.View;
20import android.view.Window;
21
22/**
23 * Helper for accessing features in {@link Window} introduced after API
24 * level 4 in a backwards compatible fashion.
25 */
26public class WindowCompat {
27    /**
28     * Flag for enabling the Action Bar.
29     * This is enabled by default for some devices. The Action Bar
30     * replaces the title bar and provides an alternate location
31     * for an on-screen menu button on some devices.
32     */
33    public static final int FEATURE_ACTION_BAR = 8;
34
35    /**
36     * Flag for requesting an Action Bar that overlays window content.
37     * Normally an Action Bar will sit in the space above window content, but if this
38     * feature is requested along with {@link #FEATURE_ACTION_BAR} it will be layered over
39     * the window content itself. This is useful if you would like your app to have more control
40     * over how the Action Bar is displayed, such as letting application content scroll beneath
41     * an Action Bar with a transparent background or otherwise displaying a transparent/translucent
42     * Action Bar over application content.
43     *
44     * <p>This mode is especially useful with {@link View#SYSTEM_UI_FLAG_FULLSCREEN
45     * View.SYSTEM_UI_FLAG_FULLSCREEN}, which allows you to seamlessly hide the
46     * action bar in conjunction with other screen decorations.
47     *
48     * <p>As of {@link android.os.Build.VERSION_CODES#JELLY_BEAN}, when an
49     * ActionBar is in this mode it will adjust the insets provided to
50     * {@link View#fitSystemWindows(android.graphics.Rect) View.fitSystemWindows(Rect)}
51     * to include the content covered by the action bar, so you can do layout within
52     * that space.
53     */
54    public static final int FEATURE_ACTION_BAR_OVERLAY = 9;
55
56    /**
57     * Flag for specifying the behavior of action modes when an Action Bar is not present.
58     * If overlay is enabled, the action mode UI will be allowed to cover existing window content.
59     */
60    public static final int FEATURE_ACTION_MODE_OVERLAY = 10;
61}
62