Search in sources :

Example 21 with MenuView

use of com.android.internal.view.menu.MenuView in project android_frameworks_base by crdroidandroid.

the class ActionMenuPresenter method getMenuView.

@Override
public MenuView getMenuView(ViewGroup root) {
    MenuView oldMenuView = mMenuView;
    MenuView result = super.getMenuView(root);
    if (oldMenuView != result) {
        ((ActionMenuView) result).setPresenter(this);
        if (oldMenuView != null) {
            ((View) oldMenuView).removeOnAttachStateChangeListener(mAttachStateChangeListener);
        }
        ((View) result).addOnAttachStateChangeListener(mAttachStateChangeListener);
    }
    return result;
}
Also used : MenuView(com.android.internal.view.menu.MenuView) MenuView(com.android.internal.view.menu.MenuView) View(android.view.View) ActionMenuItemView(com.android.internal.view.menu.ActionMenuItemView)

Aggregations

MenuView (com.android.internal.view.menu.MenuView)21 View (android.view.View)15 ActionMenuItemView (com.android.internal.view.menu.ActionMenuItemView)15 ViewGroup (android.view.ViewGroup)10 SparseArray (android.util.SparseArray)5 ActionProvider (android.view.ActionProvider)5 MenuItemImpl (com.android.internal.view.menu.MenuItemImpl)5