CollapsibleActionView.java revision 2e21b5e22c320fd7e6af86a7cc05b4b11d7a0f64
1/*
2 * Copyright (C) 2011 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.view;
18
19import android.support.v4.view.MenuItemCompat.OnActionExpandListener;
20
21/**
22 * When a {@link android.view.View} implements this interface it will receive callbacks when expanded or
23 * collapsed as an action view alongside the optional, app-specified callbacks to {@link
24 * OnActionExpandListener}.
25 *
26 * <p>See {@link android.support.v4.internal.view.SupportMenuItem} for more information about action views.
27 * See {@link android.app.ActionBar} for more information about the action bar.
28 */
29public interface CollapsibleActionView {
30
31    /**
32     * Called when this view is expanded as an action view. See {@link
33     * android.support.v4.view.MenuItemCompat#expandActionView(android.view.MenuItem)}.
34     */
35    public void onActionViewExpanded();
36
37    /**
38     * Called when this view is collapsed as an action view. See {@link
39     * android.support.v4.view.MenuItemCompat#collapseActionView(android.view.MenuItem)}.
40     */
41    public void onActionViewCollapsed();
42}
43