1e6072e2d918169bd827cf7431347fb648124c227Jeff Brown/*
2e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * Copyright (C) 2013 The Android Open Source Project
3e6072e2d918169bd827cf7431347fb648124c227Jeff Brown *
4e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * Licensed under the Apache License, Version 2.0 (the "License");
5e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * you may not use this file except in compliance with the License.
6e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * You may obtain a copy of the License at
7e6072e2d918169bd827cf7431347fb648124c227Jeff Brown *
8e6072e2d918169bd827cf7431347fb648124c227Jeff Brown *      http://www.apache.org/licenses/LICENSE-2.0
9e6072e2d918169bd827cf7431347fb648124c227Jeff Brown *
10e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * Unless required by applicable law or agreed to in writing, software
11e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * distributed under the License is distributed on an "AS IS" BASIS,
12e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * See the License for the specific language governing permissions and
14e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * limitations under the License.
15e6072e2d918169bd827cf7431347fb648124c227Jeff Brown */
16e6072e2d918169bd827cf7431347fb648124c227Jeff Brown
17e6072e2d918169bd827cf7431347fb648124c227Jeff Brownpackage android.support.v4.view;
18e6072e2d918169bd827cf7431347fb648124c227Jeff Brown
19e6072e2d918169bd827cf7431347fb648124c227Jeff Brownimport android.view.View;
20e6072e2d918169bd827cf7431347fb648124c227Jeff Brownimport android.view.Window;
21e6072e2d918169bd827cf7431347fb648124c227Jeff Brown
22e6072e2d918169bd827cf7431347fb648124c227Jeff Brown/**
23e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * Helper for accessing features in {@link Window} introduced after API
24e6072e2d918169bd827cf7431347fb648124c227Jeff Brown * level 4 in a backwards compatible fashion.
25e6072e2d918169bd827cf7431347fb648124c227Jeff Brown */
26e6072e2d918169bd827cf7431347fb648124c227Jeff Brownpublic class WindowCompat {
27e6072e2d918169bd827cf7431347fb648124c227Jeff Brown    /**
28e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * Flag for enabling the Action Bar.
29e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * This is enabled by default for some devices. The Action Bar
30e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * replaces the title bar and provides an alternate location
31e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * for an on-screen menu button on some devices.
32e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     */
33e6072e2d918169bd827cf7431347fb648124c227Jeff Brown    public static final int FEATURE_ACTION_BAR = 8;
34e6072e2d918169bd827cf7431347fb648124c227Jeff Brown
35e6072e2d918169bd827cf7431347fb648124c227Jeff Brown    /**
36e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * Flag for requesting an Action Bar that overlays window content.
37e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * Normally an Action Bar will sit in the space above window content, but if this
38e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * feature is requested along with {@link #FEATURE_ACTION_BAR} it will be layered over
39e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * the window content itself. This is useful if you would like your app to have more control
40e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * over how the Action Bar is displayed, such as letting application content scroll beneath
41e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * an Action Bar with a transparent background or otherwise displaying a transparent/translucent
42e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * Action Bar over application content.
43e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     *
44e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * <p>This mode is especially useful with {@link View#SYSTEM_UI_FLAG_FULLSCREEN
45e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * View.SYSTEM_UI_FLAG_FULLSCREEN}, which allows you to seamlessly hide the
46e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * action bar in conjunction with other screen decorations.
47e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     *
48e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * <p>As of {@link android.os.Build.VERSION_CODES#JELLY_BEAN}, when an
49e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * ActionBar is in this mode it will adjust the insets provided to
50e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * {@link View#fitSystemWindows(android.graphics.Rect) View.fitSystemWindows(Rect)}
51e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * to include the content covered by the action bar, so you can do layout within
52e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * that space.
53e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     */
54e6072e2d918169bd827cf7431347fb648124c227Jeff Brown    public static final int FEATURE_ACTION_BAR_OVERLAY = 9;
55e6072e2d918169bd827cf7431347fb648124c227Jeff Brown
56e6072e2d918169bd827cf7431347fb648124c227Jeff Brown    /**
57e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * Flag for specifying the behavior of action modes when an Action Bar is not present.
58e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     * If overlay is enabled, the action mode UI will be allowed to cover existing window content.
59e6072e2d918169bd827cf7431347fb648124c227Jeff Brown     */
60e6072e2d918169bd827cf7431347fb648124c227Jeff Brown    public static final int FEATURE_ACTION_MODE_OVERLAY = 10;
61e6072e2d918169bd827cf7431347fb648124c227Jeff Brown}
62