diff options
author | Tor Norbye <tnorbye@google.com> | 2011-02-01 08:10:32 -0800 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2011-02-07 16:12:11 -0800 |
commit | a7da09b74d5f41667823ddf36c0cd7f145f54a2d (patch) | |
tree | 0d7e4ddf9874a9b07ec59f413df108b8921eccea /eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout | |
parent | 28587d77487709864bc17b16dca0f93e613e308d (diff) | |
download | sdk-a7da09b74d5f41667823ddf36c0cd7f145f54a2d.zip sdk-a7da09b74d5f41667823ddf36c0cd7f145f54a2d.tar.gz sdk-a7da09b74d5f41667823ddf36c0cd7f145f54a2d.tar.bz2 |
Add Layout Actions toolbar
Add a new toolbar above the layout canvas (and to the right of the
palette). This toolbar shows various layout-related actions on its
left, and the canvas zoom controls on the right. The zoom controls
have been moved from the configuration panel, which has also been
reorganized a little with three of the dropdowns moved up to make more
horizontal width and take the place of the old zoom controls.
The toolbar items vary based on which layout is "active". The active
layout is the parent layout of the selection, or the root layout in
the canvas if there is no selection.
Some examples:
- In a LinearLayout, there are radio-button icons for switching
between horizontal and vertical orientation, and for toggling
baseline alignment
- There are toggle buttons for toggling between wrap_content and
match_parent (or fill_parent) for the layout_width and layout_height
properties
- There is a dropdown menu in LinearLayout and RelativeLayout which
lets you set the layout_gravity to one of the dozen gravity settings
- There is an action button which brings up a margin chooser dialog
where you can configure the margin settings for the currently
selected elements for layouts that support margins
There will be additional actions here in the future.
This changeset also adds a few new MenuAction subclasses and factories
to make it possible to do ordered lists of choices. It also adds
sorting keys to make it easier for parents and children to interleave
their actions with simple sorting keys rather than having to append,
prepend or merge their respective result lists. In a follow-up
changeset I will replace the context menu code to use these, as well
as attempt to make all actions stateless such that they can be cached
and reapplied for different targets.
Some misc cleanup.
Change-Id: I6a87144fcfd1d359e5561829bd5d63c852f16970
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/LayoutTestBase.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/LayoutTestBase.java b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/LayoutTestBase.java index 21e4597..5b79ac3 100644 --- a/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/LayoutTestBase.java +++ b/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/LayoutTestBase.java @@ -238,6 +238,12 @@ public abstract class LayoutTestBase extends TestCase { fail("Not supported in tests yet"); return null; } + + public String[] displayMarginInput(String all, String left, String right, String top, + String bottom) { + fail("Not supported in tests yet"); + return null; + } } public void testDummy() { |