History log of /frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0762cec04fa5ce65a2adc6d70ea1396041b1a88d 06-Sep-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #7112174 ActionMenuView should be aware of layout direction

- do correct layout of action items depending of layout direction

Change-Id: Iff0181ffa2cb69884920edd5c37eb1a8a8196816
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
9951b7c4f094d39db70626ed665f848971220c48 08-Aug-2012 Jean-Baptiste Queru <jbq@google.com> am e5c46fae: am 6d0dd51e: Merge "Return early when checking divider before child zero."

* commit 'e5c46faefb9deda885cff308ec9b1926636ca8bc':
Return early when checking divider before child zero.
d5c81db1e78e98f3e0a1a5cf206865c3056294c4 02-Aug-2012 Adam Powell <adamp@google.com> Fix some ActionBar menu issues around config changes

Bug 6904212

Update allow-text and max item height properties for action bar menu
item views properly.

Fix an ActionMenuItemView measurement bug that could cause items to
measure too small.

Change-Id: Ibac8491f7670969b0ae4584fff5e44ebd1435abd
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
825992f503439bc87d9d7e698a487f17b5acc243 29-Jul-2012 Jake Wharton <jakewharton@gmail.com> Return early when checking divider before child zero.

Previously the `getChildAt` method would be called with an index of -1 which
would lead to an exception being thrown and caught. This is unnecessary since
we know there will never be a divider before the first child. It also avoids
additional object creation since this method can be invoked quite frequently.

Change-Id: Iab44520d5d52f96a829a009cdd1201696edbf9a4
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
8c1b02e7592dd02f30750c56bf88c65f8acbd3c9 17-Jul-2012 Adam Powell <adamp@google.com> Fix MediaRouteActionProvider button sizing

Bug 6768999

Use proper layout height for MediaRouteButtons generated from
MediaRouteActionProvider.

Update ActionMenuView's LayoutParams handling to correctly propagate
width/height values if the supplied LayoutParams is of a different
type.

Change-Id: I1e1b250d873869ca27f59ffb06ccf2299d57b40d
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
367ee326058bbee6fc179b8b1eb2174fe7ba8f45 07-May-2012 Adam Powell <adamp@google.com> Limit item heights in split action bars

Bug 6449422

Overzealous action views should not be able to cause action bars to
take up a huge amount of space.

Fixed text alignment on action buttons

Change-Id: Ic28d6dacdb6933c63b323f5ed6a6cab5d3726938
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
a7dec6d9734bdc3a9e39ffd357002e25c6fdc99b 10-Apr-2012 Adam Powell <adamp@google.com> Restrictions for action buttons with text

Restrict action buttons with text to 2 lines max. Action buttons with
text will always consume at least 2 cells in split mode because they
look silly in 1.

Note that this affects text provided by menu items, not TextViews
embedded within app-provided action views.

Fixes bug 6236467

Change-Id: I7bcbf80f448b13a895ddc3bc6a7a555c0f0bac7c
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
75d022af1f24cf2d8a7551183ea5bbe943d25d21 06-Mar-2012 Adam Powell <adamp@google.com> Action buttons are now 1 view instead of 3.

Change-Id: I42afe0e4bd20c3dbe86e2c43a6bc1d776361dca9
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
7bc3ca0dc52be52ecad1c0de8c62a6a4bf8141ca 27-Aug-2011 Adam Powell <adamp@google.com> Accessibility fixes for action bars

Fix bug 5220543 - fix accessibility events for action buttons

Fix bug 5224260 - fix accessibility events for home/up

Change-Id: I7d55b4819862e1eda0809da92c52ec2d97f36af0
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
be3c329ebec083e5ff933bab6b6c501519ad2bff 24-Aug-2011 Adam Powell <adamp@google.com> Fix bug 5191728 - Specialized formatting in the split action bar

Visually center a single text menu item in the split action bar even
when an overflow button is present.

Fix a bug in allocating space in the split action bar.

Change-Id: I54eff86bf35197030c9c1656ebd71297e3c8b62b
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
3bb421d5b85a8a99c408d16e4f80163a53bc0505 17-Aug-2011 Adam Powell <adamp@google.com> Fix bug 5165771 - Gmail: crash on launch from notifier

Change-Id: Iec9c189bd3fa5e62bc8eb520ca2a1dd4db106036
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
14b7e2c1688914ba8b6854738981337d7c0653be 12-Aug-2011 Adam Powell <adamp@google.com> Fix bug 5078498 - Icons jump around on split action bar

Revise measurement and layout code for the lower menu on a split
action bar.

Fix some metrics in the action mode close button and in button bars.

Change-Id: I76215e28ae3b0199162dedd32794b25c9e38a346
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
89b09da7b3b1e69264d9ec710c66eb2f891b313e 27-Jul-2011 Adam Powell <adamp@google.com> Bug 5076788 - Optimize the building and invalidation of menus

Fix cases that weren't batching menu presenter changes correctly.

Have FragmentManager invalidate the options menu less often.

Change-Id: Ia66fcd09ada8b0a084ad6b08d4340a8fa0c8fc5d
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
160bb7fa60e8ece654e6ce999b6c16af50ee7357 07-Jul-2011 Adam Powell <adamp@google.com> Action bar layout tweaks

Fix a Spinner issue that reported odd baselines

Fix detection of expandable items for action menus and allocation of cells

Use the right asset for home-as-up in Theme.Holo.Light.SolidActionBar.Inverse

Add TextAppearance.Holo.Widget.ActionBar.Menu as a basis for further
menu item styling

Sync with design for tab/menu text appearance

Change-Id: I32026bbde1cd4e15b6cda30d78d3d48250c84c94
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
35aecd5884a5ccfe380903e39f30f468315e8f92 01-Jul-2011 Adam Powell <adamp@google.com> Updates for action menus

Sync with UX designs for action menus in split action bar mode.
Layout is now based on a grid cell scheme.

Tweak action menu item layouts.

Fix some bugs with drawing LinearLayout dividers.

Rename config resources to follow convention.

Action bar menu items now show text in ALL CAPS. This is done in a
locale-dependent manner, but if it produces problems in specific
locales the config resource config_actionMenuItemAllCaps should be set
to false for that locale.

Change-Id: I064c2dd85e012e89551f29153efcfc17f9106333
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
f4232e0097ffb672f5d1559b20c7230081efe34f 23-May-2011 Adam Powell <adamp@google.com> Change action button layout for split action bars

Change-Id: Ie1427ae6b0334bf0a8afd5cae968c286c82a3837
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
640a66eac612b850b5dabd3b93bd94f83ed2d567 29-Apr-2011 Adam Powell <adamp@google.com> Refactoring of action bar internals

Split action bar implementation details. Factor out common components
into AbsActionBar. Layout rules for the lower half of split action
bars.

Change-Id: I6bc39ba6c343055597880a7d4663dd8f30aa4999
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
696cba573e651b0e4f18a4718627c8ccecb3bda0 29-Mar-2011 Adam Powell <adamp@google.com> Refactor menu internals.

In the old world, MenuBuilder and MenuItemImpl were responsible for
generating views for any presentation of a menu. MenuBuilder needed to
know any types and resources involved, and the implied caching
semantics did not work well for menus presented within AdapterViews.

In the new world, the MenuPresenter interface takes over the
responsibility of generating views or adapters for menu
items. MenuBuilder/MenuItemImpl still provide extra metadata tracking
used by these presenters. Mutiple presenters may be active for a
single menu at a time. All of this remains internal framework
implementation details.

BaseMenuPresenter provides a simple base for presenters that treats
the host MenuView more like an AdapterView. This allows for less
rebuilding of views when items are added/removed.

Callbacks have been restructured. Calls that relate to the menu itself
are still handled by MenuBuilder.Callback, but calls related to a
specific presentation of a menu are handled by MenuPresenter.Callback
objects attached to a MenuPresenter.

Also add API to programmatically set divider options for LinearLayout
and hidden API so that ActionBarView can have finer-grained control
over divider placement.

Change-Id: I2265b86a084279822908021aec20dfbadc1bb56b
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
f2d7a5d8312b78f84e6cc63277ec7ec874722015 08-Feb-2011 Adam Powell <adamp@google.com> Fix bug 3426162 - Overflow menu closes on its own

Makes populating action menus smarter, doesn't completely empty and
repopulate. Fixes issues where changing menus can leave popups without
an anchor.

Change-Id: I03cc266f0952123c5704a78cdcfc69b77af1915b
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
55767443adaf31c377ff1d7abf2d3fe7f01bfbaa 24-Jan-2011 Adam Powell <adamp@google.com> Fix bug 3382994 - android.view.WindowManager$BadTokenException

Remove pending callbacks when ActionMenuView is detached.

Change-Id: Ia61e446f60f10dd82476c00b4c11177182e7db60
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
b3312b88c1f10cd29f9b55b03d5b41fc429ebfb5 22-Jan-2011 Adam Powell <adamp@google.com> Fix bug 3360851 - actionbar overflow menu button doesn't trigger "audible selection"

Change-Id: I768d35f9752d5f6466708fd191781aa26aefd121
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
36fced9b211255e2137014e21fb3259042d8da85 17-Jan-2011 Adam Powell <adamp@google.com> Fix bug 3050138 - Action bar does not display correctly when many
action items are added

Rules for action bar overflow:

Items are considered for inclusion in the order specified within the
menu. There is a limit of a total count, optionally including the
overflow menu button itself. This is a soft limit; if an item shares a
group ID with an item previously included as an action item, the new
item will stay with its group and become an action item itself even if
it breaks the max item count limit. This is done to limit the
conceptual complexity of the items presented within an action
bar. Only a few unrelated concepts should be presented to the user in
this space, and groups are treated as a single concept.

There is also a hard limit of consumed measurable space. This limit
may be broken by a single item that exceeds the remaining space, but
no further items may be added. If an item that is part of a group
cannot fit within the remaining measured width, the entire group will
be demoted to overflow. This is done to ensure room for navigation and
other affordances in the action bar as well as reduce general UI
clutter.

The space freed by demoting a full group cannot be consumed by future
menu items. Once items begin to overflow, all future items become
overflow items as well. This is to avoid inadvertent reordering that
may break the app's intended design.

Change-Id: I878f6b15619059258c91c01f4fe838feac161d6d
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
e7d468410b3a783560d5158a5798cef1b4b67702 14-Jan-2011 Adam Powell <adamp@google.com> Rework action bar menus.

Fix bug 3328810 - remove icons from action bar overflow menu. Popup
menus now will not show icons. Give popup menu items a minimum width.
Alter the sizing of popup menus.

Fix bug 3192635 - revise rules for action menu dividers. Dividers now
appear between the overflow button and any other items next to it, and
anywhere they disambiguate touch targets between text and other
content. Action views are on their own and should include their own
dividers if needed.

Remove dividers from around action bar spinners and tabs.

Change-Id: I935b48b473606ac2adde5e2b251bf30ebe2a3da9
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
f0ad6e6eaf48ac8f4007232ad0a8511a7b5cfc0e 11-Jan-2011 Adam Powell <adamp@google.com> Fix bug 3333015 - Overflow menu item submenus do not open

Submenus of action bar menus will open as new menus.

Change-Id: I924b87bbea91b0df5e3608ec894530302c0e1d8d
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
5e3f284baa271cb0fbf90e504d19fdd2e385382e 08-Jan-2011 Adam Powell <adamp@google.com> Fix bug 3200615 - "MenuPopupHelper cannot be used without an anchor"

Add protection against views disappearing before previously posted
Runnables attempt to show a menu anchored to them.

Change-Id: Ia2a322e76665e61feb5bdb92377d5066cb6d5b04
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
d16c9884bb0bd06f9d7aa1be649226a5df6591ee 07-Jan-2011 Adam Powell <adamp@google.com> Fix bug 3330223 - onCreateOptionsMenu() unable to getActionView()
immediately after orientation change

Inflate action view layout resource earlier so that calls to
getActionView are valid immediately after menu inflation.

Change-Id: I8023328b1a77670ac42a783f6e4b46aa5c2a798e
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
345a9f4e6d0a1b60664b010385f36456a5fef25d 07-Jan-2011 Adam Powell <adamp@google.com> Fix bug 3212471 - Widget.Holo.ActionButton style and friends now 76% more useful

Change-Id: Ideb37c8a31e37df8fcfc549d12b4b6cafc983ca1
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
3f476b34049d062942eafcf48396f593e00bd324 04-Jan-2011 Adam Powell <adamp@google.com> Revisiting ActionBar API and layout.

Fix several bugs where ActionBar was ignoring LayoutParams in action
views.

Add convenience methods for toggling display options flags.

Add layout resource version of ActionBar#setCustomView

Fix a bug preventing actionViewClasses from being loaded properly in
menu xml.

Change-Id: I0d9a0b635fd9cfc020bac69369c0c7749c226349
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
cf0357639e952a87f0d535c82691919af81f058b 06-Dec-2010 Adam Powell <adamp@google.com> Clean up button bar styles

Change-Id: I65b6600f72b92db024f83b63d3ea91abc1cbb96c
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
8515ee846bd76aee86ec5ddfcc4dd1e626dd999c 30-Nov-2010 Adam Powell <adamp@google.com> Fix bug 3240444 - add OnMenuVisibilityListener for action bar.

Fix bug 3180015 - leaking window handles on configuration change for
action bar dropdown menus

Rename ActionBar.NavigationCallback to something more consistent with
the rest of the API.

Change-Id: Ic1fb4c07484c57a72649b30e27d220b18cda6cdf
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
9ab978713ce86fdaefed2407f4f3c998ab0e3178 27-Oct-2010 Adam Powell <adamp@google.com> Action bar API updates - new display options

Change-Id: I55e56cd7aafa53994990079e88ef85e4eb1a0b3f
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
f16888f1e849b0bc0b9c17e5f833c4e2cd54c382 12-Oct-2010 Adam Powell <adamp@google.com> Holo fixes

* Fix up ButtonGroup to behave better.
* Fix bad states with holo list selectors.
* Clean up action mode UI components.
* Change action mode UI to use a text button instead of 'X' to dismiss.
* Fixed spinner dropdowns for Holo.Light

Change-Id: Ifc092bd549ffb539d6a3b2ddd95ebd4b114a441f
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
be4d68e7b238b8ee879de0481e39c40d3f1683b6 09-Oct-2010 Adam Powell <adamp@google.com> Updated styles and metrics.

* Added preliminary ButtonGroup support for buttons that display as a unit.
* Fixed a bug with MenuBuilder that caused old-style icon menus to fail.
* Added support for explicitly setting line height in text.

Change-Id: I1ba65f09dd9e1bc833d247ebe72052a21e3f99f0
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
cf78b3e5101349fdddbde14b3a55140f9562ae66 13-Sep-2010 Adam Powell <adamp@google.com> Add support for custom action views in ActionBar menus

Change-Id: Ic7850bc00fcfe95d805dd6a1b15cb5d413942475
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
079fd1c0a329b0fbd3761abe2e900a941131efed 09-Sep-2010 Adam Powell <adamp@google.com> Make action buttons more style-based

Change-Id: Ia7ef4da8d8004f1b3809b4883aafc541695d235a
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
6c6f575423d6718c3ff322224c1520901ce881e1 21-Aug-2010 Adam Powell <adamp@google.com> More ActionBar/config change tweaks. Preserve open overflow menus

Change-Id: Ic8ad2b1e3909fbf84ff4d852ae046a9f9508477c
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
773b1b97fc0f01efc8cf1e17a1250a9b654b1b85 21-Aug-2010 Adam Powell <adamp@google.com> Make ActionBar menus handle configuration changes gracefully.

Change-Id: I2c9ca846143b313ef9d2a01dff81385e0693518d
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
f6148c53f93978af678cc0559a4417b608a33ae1 12-Aug-2010 Adam Powell <adamp@google.com> Fix bug 2911311 and bug 2911700

Integrate the action bar overflow menu better with the options menu lifecycle.

Change-Id: I1e3fdba04b01718c3ee3367f92e5dabe7bc84b5c
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
6b336f835d637853800b94689375a03f337139a4 11-Aug-2010 Adam Powell <adamp@google.com> ActionBar overlay mode, height fetching, show/hide

Change-Id: Ie931ed26ec885d891d6733132b517a53d95f8491
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
f75eeb28def26798682748aa5dedabebac86bb6a 11-Aug-2010 Adam Powell <adamp@google.com> Fix bug 2908822 - open/closePanel should do the right thing with ActionBars

Change-Id: Ic77f9dee864d17046f69c78a1e6d96a49b5c6180
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
b366bbae2b5a3009893ef64246e3430cea4b7736 20-Jul-2010 Adam Powell <adamp@google.com> Make sure action bar context modes reserve space for overflow menus on all devices.

Change-Id: I393f041efef3852b7f3ee57c6a4c26ba176b2702
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
8028dd32a4a04154050220dd0693583d5b750330 15-Jul-2010 Adam Powell <adamp@google.com> Overflow menu for action bars.

The overflow menu replaces the normal options menu panel for
activities with an action bar. It always appears as the rightmost
action button and is displayed as a dropdown menu. The menu key
summons and dismisses the overflow menu instead of the options panel
where applicable.

Change-Id: I0b4fa7e36f35ab12e2f0c1d12bec79ccab8cc4b1
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
89e0645b4157961e8c465eb9c819f965fdb453d8 24-Jun-2010 Adam Powell <adamp@google.com> Added context modes to ActionBar API.

Change-Id: I7c3e782cbf01be7bc671b377fb4d706040888833
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
7ade1be822ed05a143b059319dccd5e9f623b56d 17-Jun-2010 Adam Powell <adamp@google.com> Action bar button layout changes.

Theme attribute added for spacing between action buttons. Action
buttons are now allowed to fill up to half of the total action bar's
width.

Change-Id: Iabbc67e695684529dfae9681d4d9580cd30839d0
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java
96675b1df3969f2d313b68f60ed9fa36805db8ce 11-Jun-2010 Adam Powell <adamp@google.com> Merging ActionBar menu with options menu.

Options menu items may now specify if they would like to appear in the
action bar. Menu items defined in xml may set the showAsAction
attribute to one of "never"(default), "ifRoom", or "always". Action
buttons are populated as follows:

* All showAsAction="always" items become action buttons, even if it
would crowd the navigation area of the action bar.

* If there is space remaining, showAsAction="ifRoom" items are added
until no more will fit comfortably.

Action button click events are now handled by the
onOptionsItemSelected method used by the standard options menu.

The construction of options menus now happens earlier in order to
provide data to the action bar. Activities with an action bar can now
expect to have onCreateOptionsMenu called when activity start-up is
complete.

Activity#invalidateOptionsMenu can be used to force a refresh of menu
items where the previous API would use ActionBar#updateActionMenu.

Change-Id: If52ddf1cf9f6926206bcdeadf42072ea2c24fab9
/frameworks/base/core/java/com/android/internal/view/menu/ActionMenuView.java