History log of /frameworks/base/core/java/com/android/internal/view/menu/MenuAdapter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
23087be7792c2d22173cf022a72d0648aa430ab5 08-Sep-2015 Oren Blasberg <orenb@google.com> Cascading popup menus: open submenu on mouse hover.

When the cascading feature is enabled, users can mouseover a
submenu item in a popup menu to expand and open the new submenu
(after a short timeout). Similarly, if a user mouseovers a
different menu item in the original menu, the submenu gets closed
(again, after a short timeout).

This should complete the implementation of cascading submenu
functionality.

Also fix two other issues:

(1) Update some oudated code in PopupMenu that was still opening
the submenu when a user clicks on a submenu item; this
responsibility now lives within the MenuPopupHelper's delegate
MenuPopup class, so it doesn't need to live in PopupMenu anymore.

(2) Fix an issue where icons would be force-set on a submenu when they
should not be. Instead, decide whether to show icons in a submenu
based on whether to show them in the top level menu, as intended.

Bug: 20127825
Change-Id: Ia46852c7f99436065ab4bc234de94dffc0019666
/frameworks/base/core/java/com/android/internal/view/menu/MenuAdapter.java
f44d90b5c247f0629201d1fa322b83fa55b20608 31-Aug-2015 Oren Blasberg <orenb@google.com> Pull out widget helpers into their own classes.

This is in service of desktop-style submenus. Follow up CLs will make
use of the newly independent classes. MOST of the changes in this CL
are simply moving code from one place to another. Below are
descriptions of the new files added:

DropDownListView:
Decouple this from ListPopupWindow, so other "menu popup"
implementations [forthcoming] may make use of it.
This class is UNCHANGED except for the addition of the
setListSelectionHidden method.

ForwardingListener:
Decouple this from ListPopupWindow, so that other clients of this
listener can expect a more general ShowableListMenu rather than a
concrete ListPopupWindow. This will be useful later when we want to
use something other than ListPopupWindow to show a menu.
This class is UNCHANGED, except for (1) using the getListView() on
popup rather than accessing its mDropDownList member, and (2)
replacing ListPopupWindow return values with ShowableListMenu.

MenuAdapter:
Decouple from MenuPopupHelper so it may be used by forthcoming "menu
popup" implementations rather than just by MenuPopupHelper itself.
This class is UNCHANGED.

ShowableListMenu:
A new interface to encapsulate a menu that can be shown or hidden.
This will be implemented by both ListPopupWindow and a forthcoming
"menu popup" class.

Bug: 20127825
Change-Id: I565b444d25e966ff8b8c6ceac7be8de56a9116df
/frameworks/base/core/java/com/android/internal/view/menu/MenuAdapter.java