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