2 * Copyright (C) 2006 The Android Open Source Project
\r
3 * Copyright (C) 2011 Jake Wharton
\r
5 * Licensed under the Apache License, Version 2.0 (the "License");
\r
6 * you may not use this file except in compliance with the License.
\r
7 * You may obtain a copy of the License at
\r
9 * http://www.apache.org/licenses/LICENSE-2.0
\r
11 * Unless required by applicable law or agreed to in writing, software
\r
12 * distributed under the License is distributed on an "AS IS" BASIS,
\r
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 * See the License for the specific language governing permissions and
\r
15 * limitations under the License.
\r
18 package com.actionbarsherlock.view;
\r
20 import android.content.Context;
\r
23 * <p>Abstract base class for a top-level window look and behavior policy. An
\r
24 * instance of this class should be used as the top-level view added to the
\r
25 * window manager. It provides standard UI policies such as a background, title
\r
26 * area, default key processing, etc.</p>
\r
28 * <p>The only existing implementation of this abstract class is
\r
29 * android.policy.PhoneWindow, which you should instantiate when needing a
\r
30 * Window. Eventually that class will be refactored and a factory method added
\r
31 * for creating Window instances without knowing about a particular
\r
32 * implementation.</p>
\r
34 public abstract class Window extends android.view.Window {
\r
35 public static final long FEATURE_ACTION_BAR = android.view.Window.FEATURE_ACTION_BAR;
\r
36 public static final long FEATURE_ACTION_BAR_OVERLAY = android.view.Window.FEATURE_ACTION_BAR_OVERLAY;
\r
37 public static final long FEATURE_ACTION_MODE_OVERLAY = android.view.Window.FEATURE_ACTION_MODE_OVERLAY;
\r
38 public static final long FEATURE_NO_TITLE = android.view.Window.FEATURE_NO_TITLE;
\r
39 public static final long FEATURE_PROGRESS = android.view.Window.FEATURE_PROGRESS;
\r
40 public static final long FEATURE_INDETERMINATE_PROGRESS = android.view.Window.FEATURE_INDETERMINATE_PROGRESS;
\r
43 * Create a new instance for a context.
\r
45 * @param context Context.
\r
47 private Window(Context context) {
\r
52 public interface Callback {
\r
54 * Called when a panel's menu item has been selected by the user.
\r
56 * @param featureId The panel that the menu is in.
\r
57 * @param item The menu item that was selected.
\r
59 * @return boolean Return true to finish processing of selection, or
\r
60 * false to perform the normal menu handling (calling its
\r
61 * Runnable or sending a Message to its target Handler).
\r
63 public boolean onMenuItemSelected(int featureId, MenuItem item);
\r