WindowCallback.java revision c4b9e0cb716a4caff218b27d86f37ef8117d257b
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 17package android.support.v7.internal.app; 18 19import android.support.v7.view.ActionMode; 20import android.view.Menu; 21import android.view.MenuItem; 22import android.view.View; 23 24/** 25 * Interface which allows us to intercept and control calls to {@link android.view.Window.Callback}. 26 * Used by ActionBarActivityDelegates. 27 * 28 * @hide 29 */ 30public interface WindowCallback { 31 32 boolean onMenuItemSelected(int featureId, MenuItem menuItem); 33 34 boolean onCreatePanelMenu(int featureId, Menu menu); 35 36 boolean onPreparePanel(int featureId, View menuView, Menu menu); 37 38 void onPanelClosed(int featureId, Menu menu); 39 40 boolean onMenuOpened(int featureId, Menu menu); 41 42 ActionMode startActionMode(ActionMode.Callback callback); 43 44} 45