diff options
author | Tor Norbye <tnorbye@google.com> | 2011-08-09 15:58:34 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2011-08-15 09:39:51 -0700 |
commit | 94986e745141118cace0391da1b4dc8533408751 (patch) | |
tree | 00edab058574d09cde76fe6da539b5da220a378d /eclipse/dictionary.txt | |
parent | a0e782572d9e5d31b83f8053b4425131196f57e2 (diff) | |
download | sdk-94986e745141118cace0391da1b4dc8533408751.zip sdk-94986e745141118cace0391da1b4dc8533408751.tar.gz sdk-94986e745141118cace0391da1b4dc8533408751.tar.bz2 |
Action API improvements
This changeset changes the Actions mechanism for view rules to add
support for the following:
* Delayed computation of submenu contents. Before this, a view rule
would have to produce the full tree of actions to be shown in menus
and submenus - for example including all the properties, and in turn
all the enumerated values for those properties and so on. Now
there's a Provider interface which can be used to compute these menu
items only when the menu is actually opened. The properties menu now
takes advantage of this.
This was also necessary to implement the following new feature:
* The layout editor context menu now also lists not just the
properties for the currently selected views, but also the
properties for the parents. For example, if you open the context
menu, you'll see the properties for the button you just right
clicked on, but there will also be a "frameLayout1" submenu
containing the actions for the <FrameLayout> parent of the button,
and a "linearLayout1" submenu for the parent linear layout. This
is useful when a parent layout doesn't have blank space on its own
so it is difficult to target.
A future CL will use the lazy initialization to add more options to
the properties menu.
* Support for arbitrary nesting. Submenus can contain submenus can
contain other submenus etc.
* Custom ordering. This changeset moves the "sort priority" concept
(which was already used for layout actions) up to all actions, which
makes it easier for rules to cooperate on ordering because instead
of appending or prepending to the superclass' context menu result,
actions can now just be initialized with a sorting priority value
which makes it trivial to interleave actions regardless of who adds
them. This also makes it a lot easier to use custom ordering in
choice menus where the ordering used to be alphabetically sorting on
keys.
* Improved support for multiselection. The callback interface now
takes a list of nodes to apply the callback to, and actions can
indicate whether they support multiple nodes. This makes it possible
for actions to more directly support the case where you apply an
action to multiple nodes. As before, the available actions in the
context menu is limited such that it only shows the actions common
to all. But now those actions can do something specific. For
example, if you select "Edit Text..." on many nodes, you will get
the input-string dialog once, and then the value is applied to
all. Similarly, if you select "Edit Id..." it will ask for a
separate id for each value (and you can cancel out of this loop).
There are various API changes too. Since the Choices action (which had
a map-based set of values) was removed, the OrderedChoices is now
renamed Choices. The Actions subclass of MenuAction which all actions
also extended has simply been moved up to the top level MenuAction.
And MenuAction has been renamed to RuleActions since they are used
not just for menus but for toolbars etc and the key thing about this
interface is that they are intended for use by rules.
Change-Id: If49f75213f2041ebfef7e84254d70d219bb766ab
Diffstat (limited to 'eclipse/dictionary.txt')
-rw-r--r-- | eclipse/dictionary.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/eclipse/dictionary.txt b/eclipse/dictionary.txt index 8a41c8d..5dfa5ba 100644 --- a/eclipse/dictionary.txt +++ b/eclipse/dictionary.txt @@ -79,6 +79,7 @@ dp dpi drawable drawables +dropdown ed editable endpoint |