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