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