OSDN Git Service
The Android Open Source Project [Mon, 15 Nov 2010 23:43:19 +0000 (15:43 -0800)]
merge from open-source master
Change-Id: Ic0f26cdf72551a108fee8877263346a8c91eab96
Tor Norbye [Mon, 15 Nov 2010 23:34:15 +0000 (15:34 -0800)]
Merge "Improvements to LinearLayout feedback"
Tor Norbye [Mon, 15 Nov 2010 23:04:31 +0000 (15:04 -0800)]
Improvements to LinearLayout feedback
When you have a small and empty linear layout, and you drag something
larger (such as a button) into it, the drop feedback is a bit
confusing: The drop feedback rectangle is larger than the linear
layout, so the bounds are outside the layout. This changeset addresses
this by forcing the bounds of the drop preview to be at most the
dimensions of the LinearLayout itself.
Second, the fix I applied last week to show the last insert position,
did not work in all cases - in particular when the drag originates
outside the canvas itself. To determine if we are inserting at the
last position, look at the number of target node children, rather than
the number of potential insert positions, since in some cases the
number of insert positions will be smaller than the number of
children.
Finally, there was a theoretical bug that if one of the dragged
elements did not non-zero bounds, then the insert position would be
wrong. This is also fixed by this changeset.
Change-Id: Ia30e99f7a3aa45b8091855b69aaef86ec3699405
The Android Open Source Project [Mon, 15 Nov 2010 22:31:43 +0000 (14:31 -0800)]
merge from open-source master
Change-Id: Ife73a3a44823869ddc2536650aa8f68bbb1f5f45
Raphael Moll [Mon, 15 Nov 2010 22:30:39 +0000 (14:30 -0800)]
Merge "Exclude BackupAgentHelper classes from Proguard."
Tor Norbye [Mon, 15 Nov 2010 22:28:47 +0000 (14:28 -0800)]
Merge "Add drop shadow to dragged items"
Xavier Ducrohet [Mon, 15 Nov 2010 22:21:19 +0000 (14:21 -0800)]
Merge "Update the Eclipe plug-ins/features version number."
Xavier Ducrohet [Mon, 15 Nov 2010 22:00:57 +0000 (14:00 -0800)]
Update the Eclipe plug-ins/features version number.
Change-Id: Ib5f49d91506de5e218d80af1d05d06ba49155cb6
Tor Norbye [Mon, 15 Nov 2010 17:55:52 +0000 (09:55 -0800)]
Add drop shadow to dragged items
Add in a drop shadow to items dragged from the palette. The primary
reason we need this is that some views (in some themes) only render
light content on top of a transparent background, which makes them
nearly impossible to see on a gray background (e.g. over the palette,
when you initiate the drag). The drop shadow helps add contrast. It
also makes the drag look better since it helps the drag preview image
stand out from the background and visually appear to be lifted on top
of it.
Since we're doing more image processing now, I moved the existing
non-SWT image manipulation methods into a separate ImageUtils class.
This changeset also fixes the way we pick the color to crop out when
using older layout libraries (without transparency support). We now
pick a pixel closer to the bounds of the rendered view such that we
for example can handle themes like the dialog theme.
Change-Id: Ifcbb840ef715bf26a9609f6996a4f136de5ca754
The Android Open Source Project [Mon, 15 Nov 2010 21:34:29 +0000 (13:34 -0800)]
merge from open-source master
Change-Id: I73a17a632843a059725334b415445cc892908dca
The Android Open Source Project [Mon, 15 Nov 2010 21:21:56 +0000 (13:21 -0800)]
merge from tools_r8
Change-Id: I7eb330edd8f5fdb70b54ad61e773071a46131984
Xavier Ducrohet [Mon, 15 Nov 2010 20:56:42 +0000 (12:56 -0800)]
Merge "ADT tools location: traceview is a .bat" into tools_r8
The Android Open Source Project [Mon, 15 Nov 2010 21:08:06 +0000 (13:08 -0800)]
merge from open-source master
Change-Id: I3bdc35f41c5b72e658cf8271edc0df8ffb1a479f
Xavier Ducrohet [Mon, 15 Nov 2010 20:57:05 +0000 (12:57 -0800)]
Merge "Use env var com.android.ddms.bindir for ddms."
The Android Open Source Project [Mon, 15 Nov 2010 19:45:29 +0000 (11:45 -0800)]
merge from open-source master
Change-Id: I393184c1706ee9ac5aaac356116385f179dd6df8
Tor Norbye [Mon, 15 Nov 2010 19:39:04 +0000 (11:39 -0800)]
Merge "Fix drag image mouse coordinate handling"
Raphael Moll [Mon, 15 Nov 2010 19:30:44 +0000 (11:30 -0800)]
Exclude BackupAgentHelper classes from Proguard.
To use the Backup API in Froyo, an app needs to typically
extend this helper class and the class is only referenced
from the AndroidManifest.xml, so ideally we should exclude
such classes from Proguard by default.
Change-Id: I690220d2e89a8ff6d0664be93dad55da8b7b66c2
Tor Norbye [Mon, 15 Nov 2010 19:24:03 +0000 (11:24 -0800)]
Fix drag image mouse coordinate handling
Instead of processing drag events using the top left corner of the
drag image, use the mouse cursor coordinate, and fix the absolute
layout rule to compute the top left corner instead.
Change-Id: I4d5096bfd04ac0abb2148196ac7e6d9d52797712
Raphael Moll [Sat, 13 Nov 2010 20:04:10 +0000 (12:04 -0800)]
ADT tools location: traceview is a .bat
This prevents adb from starting under windows, since
adt is trying to verify the presence of traceview.exe
when it's actually traceview.bat.
Change-Id: I095c9f9d992c0a888eede6b1d585a683d0f8f196
Raphael Moll [Sat, 13 Nov 2010 18:59:21 +0000 (10:59 -0800)]
Use env var com.android.ddms.bindir for ddms.
The env var is used if the system property is not defined,
which is convenient to start ddms in debug mode from Eclipse.
Change-Id: I2a33c12399c703cf3194e2e67f39562ab0d59bd9
The Android Open Source Project [Mon, 15 Nov 2010 15:27:36 +0000 (07:27 -0800)]
merge from open-source master
Change-Id: I1603a3ab68a5f0eca583a835d3db730bf3d14649
Tor Norbye [Mon, 15 Nov 2010 15:18:56 +0000 (07:18 -0800)]
Merge "Use view bounds to speed up image cropping"
Tor Norbye [Sat, 13 Nov 2010 00:29:08 +0000 (16:29 -0800)]
Use view bounds to speed up image cropping
Use the view bounds from the layout result as an initial cropping
size. This saves us from looking at a lot of empty pixels when we
render small views. This also means we can attempt rendering a larger
surface for the preview, which makes accidentally cropping large views
less likely.
(Also fix a couple of other suggestions from previous commit)
Change-Id: I9215f00db14adc42950897637e9f66aa921d484e
The Android Open Source Project [Sat, 13 Nov 2010 03:16:34 +0000 (19:16 -0800)]
merge from open-source master
Change-Id: I77c39ab13953b383641720fd44cc4958e45460e0
Raphael Moll [Sat, 13 Nov 2010 03:06:38 +0000 (19:06 -0800)]
Merge "GLE: Yet another reference to event.offsetX/Y."
Raphael Moll [Sat, 13 Nov 2010 03:06:24 +0000 (19:06 -0800)]
GLE: Yet another reference to event.offsetX/Y.
Change-Id: I13eeb5ed05a2f62d6afeb7009d934bd60f6f5cfd
The Android Open Source Project [Sat, 13 Nov 2010 02:03:28 +0000 (18:03 -0800)]
merge from open-source master
Change-Id: I7d647ada32fc96e05b308d5abb7b4b41dbe7c035
Raphael Moll [Sat, 13 Nov 2010 02:01:34 +0000 (18:01 -0800)]
Merge "Fix Build: DragSourceEvent has no offsetX/Y in SWT 3.4"
Raphael Moll [Sat, 13 Nov 2010 02:01:13 +0000 (18:01 -0800)]
Fix Build: DragSourceEvent has no offsetX/Y in SWT 3.4
Change-Id: I0edf5ed0d6bcfaa8de679203a2bb1c9beb67cc12
The Android Open Source Project [Sat, 13 Nov 2010 00:42:12 +0000 (16:42 -0800)]
merge from open-source master
Change-Id: I981a7751bb2546895eeee1cf6363e585dae495f1
Raphael Moll [Sat, 13 Nov 2010 00:32:20 +0000 (16:32 -0800)]
Merge "Win SDK: Split the win-sdk makefile and script into 2 parts."
The Android Open Source Project [Fri, 12 Nov 2010 23:41:39 +0000 (15:41 -0800)]
merge from open-source master
Change-Id: Ia3bcf17daf1dfce952dadf286562b6328a39da7c
Tor Norbye [Fri, 12 Nov 2010 23:39:27 +0000 (15:39 -0800)]
Merge "Preview items on palette drags"
The Android Open Source Project [Fri, 12 Nov 2010 23:05:42 +0000 (15:05 -0800)]
merge from open-source master
Change-Id: I9316d9dc8a881072f409f72f816bcc89bfb76910
Xavier Ducrohet [Fri, 12 Nov 2010 22:57:42 +0000 (14:57 -0800)]
Merge "Update ViewInfo in the layoutlib API."
Tor Norbye [Thu, 11 Nov 2010 02:03:07 +0000 (18:03 -0800)]
Preview items on palette drags
This checkin renders previews of Android views as you drag them from
the palette, using the current theme settings you have for the
associated editor. If you are using version 5 or later of the layout
library, you get full alpha-blending on the rendered views (so for
example in an analog clock you see right through it), and on older
version it simply crops out the edge color.
The preview image is semi-translucent, and the image is centered under
the mouse pointer. The drag feedback operations all relate to the top
left corner of the dragged item, so they are passed in the mouse
cursor minus the delta to the top left corner of the image.
The size of the preview is also used to provide bounds for the drag
feedback, such that we can show a preview rectangle rather than just
the insert point over layouts that support drop feedback.
Some views can't be rendered (e.g. QuickContactBadge), and some views
don't have any pixels painted (e.g. all the empty layouts), and in
that case we fall back to showing the palette item itself (the icon
and label) as you're dragging.
There's also a new utility class for SWT common utilities, like image
conversion.
Change-Id: I315c2dd733317bbada8dae89f57280ced2d7bb51
The Android Open Source Project [Fri, 12 Nov 2010 05:11:50 +0000 (21:11 -0800)]
merge from open-source master
Change-Id: Ie42eed0ecfd734881ccf47ed8f8068aec96619de
Tor Norbye [Fri, 12 Nov 2010 05:06:41 +0000 (21:06 -0800)]
Merge "LinearLayout guide fixes"
Xavier Ducrohet [Fri, 12 Nov 2010 02:17:37 +0000 (18:17 -0800)]
Update ViewInfo in the layoutlib API.
- support for View and LayoutParams
- support for default property value map.
Change-Id: I70028710b1f76329a8bd501428fbd68a14fafa1e
Raphael Moll [Fri, 12 Nov 2010 00:03:07 +0000 (16:03 -0800)]
Win SDK: Split the win-sdk makefile and script into 2 parts.
The main makefile+scripts to build the Windows SDK is still
in development/build/tools. However it defers to a new
matching set of files here in sdk/build to build and
package things that depend on the sdk.git or external/qemu.git.
This will make it easier for us to prepare SDKs based on
a tools_rN branch that isn't cut at the same time than the
platform branch.
This is a multi-part changeset. The other part is in
development.git.
Change-Id: Ic94d261b16ad595101c6f83cd77055715b45a622
The Android Open Source Project [Fri, 12 Nov 2010 02:03:49 +0000 (18:03 -0800)]
merge from open-source master
Change-Id: I253d1d2406972755b0c3923d7b8880257130a5ad
The Android Open Source Project [Fri, 12 Nov 2010 01:52:26 +0000 (17:52 -0800)]
merge from tools_r8
Change-Id: Ife4981cc78290d77662064cd3f6f9317f45a29ec
Xavier Ducrohet [Fri, 12 Nov 2010 01:47:27 +0000 (17:47 -0800)]
Merge "Change the adbLocation ddms extension to provide more tools location." into tools_r8
The Android Open Source Project [Fri, 12 Nov 2010 00:34:38 +0000 (16:34 -0800)]
merge from open-source master
Change-Id: I628573be1f8c407fcdae83e552ae456f5e953264
Tor Norbye [Fri, 12 Nov 2010 00:22:21 +0000 (16:22 -0800)]
Merge "Fix issue 12251: double click handling"
Xavier Ducrohet [Thu, 11 Nov 2010 23:49:31 +0000 (15:49 -0800)]
Change the adbLocation ddms extension to provide more tools location.
Previously DDMS used the adb location to find the location of other tools,
but adb moved to a different tool folder.
adbLocator extension changed to toolsLocation and provide explicit
locations for all the tools DDMS cares about. This way the logic
of the tools location is only in ADT instead of being duplicated
in DDMS.
Change-Id: I87f19c7705cb822dc793264f11e680ba09eb7f40
Tor Norbye [Fri, 12 Nov 2010 00:07:21 +0000 (16:07 -0800)]
LinearLayout guide fixes
When we have bounds for the dragged items, we show a preview rectangle
where the item will appear after the drop. We show this rectangle
midway between the two siblings that share the insert
position. However, when you are inserting *after* the last item in the
LinearLayout, there is no reason to show the item midway, since at
this point nothing below the insert position needs to be shifted
down. This checkin changes this such that for the last insert
position, we show the rectangle fully below the insert line (or to the
right of it in case of a horizontal layout).
This changeset also fixes a bug where the last (available, not active)
dropzone would not be shown on a palette drag.
Change-Id: If449b43582e072c9e0ad6d7741afbe8e845e8df9
Tor Norbye [Thu, 11 Nov 2010 23:27:11 +0000 (15:27 -0800)]
Fix issue 12251: double click handling
Surprisingly, SWT will deliver a double click event even if you click
button 1 then 3 in rapid succession. This changeset ensures that only
a double click on button 1 warps to XML.
Change-Id: I2b470e2dea5bdb4c9240c9304650ca1c7403db84
Xavier Ducrohet [Thu, 11 Nov 2010 23:14:52 +0000 (15:14 -0800)]
Fix the build by putting a missing LOCAL_MODULE_TAGS
Change-Id: I99768a0fd13801539c38e21bf0f8b4bd1f61b20c
The Android Open Source Project [Thu, 11 Nov 2010 22:55:33 +0000 (14:55 -0800)]
merge from open-source master
Change-Id: Ie428a36fc4ba622a827a56cc71822ef5763235d1
Xavier Ducrohet [Thu, 11 Nov 2010 22:45:02 +0000 (14:45 -0800)]
Merge "Rename layoutlib_utils into ide_common."
Xavier Ducrohet [Thu, 11 Nov 2010 20:44:46 +0000 (12:44 -0800)]
Rename layoutlib_utils into ide_common.
Change-Id: Id243fe66e2ce577bc821ca454bca18444ebb5e7d
The Android Open Source Project [Thu, 11 Nov 2010 20:17:23 +0000 (12:17 -0800)]
merge from open-source master
Change-Id: I9c192f53594ee176f6314c5ff83c1dbd25603b2a
Xavier Ducrohet [Thu, 11 Nov 2010 20:16:25 +0000 (12:16 -0800)]
Merge "Make ADT use the new layoutlib API."
Xavier Ducrohet [Thu, 11 Nov 2010 00:18:58 +0000 (16:18 -0800)]
Make ADT use the new layoutlib API.
ADT now exclusively use the new API.
The older platforms that still use the old API are
accessed through a compatibility layer provided by the class
LayoutBridgeWrapper that converts the old to the new API (both
input and output).
The wrapper and the loading code for the bridge have moved
to layoutlib_utils, but into the ide.common package.
Layoutlib_utils is to be renamed ide-common later.
.sdk.LoadStatus has moved into .ide.common too since
it's used by the bridge loading code. As we'll move
more code into ide-common it's ok to have it there anyway.
Also did some minor fix to the API:
- missing implementation of ViewInfo
- Made a singleton for SUCCESS state of SceneResult.
Change-Id: I5e7130ca03b92ad71dc9c293b2ffc40566df645c
The Android Open Source Project [Thu, 11 Nov 2010 02:15:01 +0000 (18:15 -0800)]
merge from open-source master
Change-Id: I4844f547041c66d7ea4b039c524e8eada9a6ec07
Xavier Ducrohet [Thu, 11 Nov 2010 02:04:31 +0000 (18:04 -0800)]
Merge "Improvements to the new Layoutlib API."
The Android Open Source Project [Thu, 11 Nov 2010 01:44:03 +0000 (17:44 -0800)]
merge from open-source master
Change-Id: I3a0d78f23c748a8bb2717ec51c36845512ef8945
Tor Norbye [Thu, 11 Nov 2010 01:33:11 +0000 (17:33 -0800)]
Merge "Refactor to make model rendering reusable"
Tor Norbye [Thu, 11 Nov 2010 01:05:01 +0000 (17:05 -0800)]
Refactor to make model rendering reusable
This changeset refactors the code in GraphicalEditorPart a bit to make
the part which renders a model into an image reusable. This will be
used by an upcoming changeset to provide previews of palette items as
you drag them.
The refactoring is straightforward, even though the diffs
unfortunately don't show it. I basically split up the large
recomputeLayout() method into smaller separate chunks (validating the
current file, validating the model and validating the sdk and looking
up the bridge) and added a new render method which can take just a
model (separate from the editor's own model) and render it.
Change-Id: I96603c4beb2d56d36416cd2b6448c87dd306217c
Xavier Ducrohet [Wed, 10 Nov 2010 22:30:18 +0000 (14:30 -0800)]
Improvements to the new Layoutlib API.
Move to classes instead of interfaces so that the layoutlib
API code can provide default implementation.
This will reduce the testing on the ADT side about whether a method
is present for the current API level or not.
Also moved all the parameters of startLayout (actually renamed createScene)
into a SceneParams class.
Change-Id: I58389cd1bed9e79f6825b7c4e5a79206496ca439
The Android Open Source Project [Wed, 10 Nov 2010 18:45:58 +0000 (10:45 -0800)]
merge from open-source master
Change-Id: I7f45f71c41479346fe109b0a71ee1f7549d3ceda
Xavier Ducrohet [Wed, 10 Nov 2010 18:34:03 +0000 (10:34 -0800)]
Merge "Minor update to the layoutlib API."
Xavier Ducrohet [Wed, 10 Nov 2010 03:02:41 +0000 (19:02 -0800)]
Minor update to the layoutlib API.
The Android Open Source Project [Wed, 10 Nov 2010 00:43:50 +0000 (16:43 -0800)]
merge from open-source master
Change-Id: Ie7442ed26653cbced8d57433e7546f5ceb59b792
Tor Norbye [Wed, 10 Nov 2010 00:38:18 +0000 (16:38 -0800)]
Merge "Add transient visibility mode for empty containers"
Tor Norbye [Mon, 8 Nov 2010 19:21:24 +0000 (11:21 -0800)]
Add transient visibility mode for empty containers
When you add a new container, such as a LinearLayout, it is usually
invisible. The reason for this is that an empty layout has 0 width and
0 height. There are two existing features in the layout editor to deal
with this: (1) Outline mode, which renders rectangles around all
views, and (2) Padding mode, which adds 10 pixels of padding to all
views. In combination, these two modes will create a rectangle for
empty layouts making them visible and user-manipulatable -- you can
for example select or drop into them.
This changeset attempts to make dealing with these types of containers
easier and more discoverable. It adds a new temporary mode where empty
containers (and only empty containers) are automatically padded and
have their outlines painted. And more importantly, this is only done
in some limited scenarios: When you drag into, or drag within, the
layout canvas. As soon as you finish the drag, empty containers
disappear again.
Unlike padding mode, we don't enlarge the design surface itself, since
this mode comes and goes easily and frequently.
In addition to this, there is special handling for selection. If you
select a zero-sized element (which for example is automatically done
when you drop a new layout, and which can also be done by clicking in
the outline), then the element is also revealed similar to the
show-empty mode, but in this case only the selected item and not any
other invisible containers are shown.
Change-Id: Ibf3ec6a080a50a8f0f55919c3d3e6c4d2890468d
The Android Open Source Project [Wed, 10 Nov 2010 00:26:07 +0000 (16:26 -0800)]
merge from open-source master
Change-Id: I872bf2f7875d101fac14e096040967596ae8f6b1
Xavier Ducrohet [Wed, 10 Nov 2010 00:19:59 +0000 (16:19 -0800)]
Merge "Fix ADT to build with the new layoutlib API."
Xavier Ducrohet [Wed, 10 Nov 2010 00:18:26 +0000 (16:18 -0800)]
Fix ADT to build with the new layoutlib API.
Also make the custom cleaning of the layoutlib looper
only done through API 4. Newer bridge can do their own clean up.
Change-Id: I1ee128e09912df53e110094d8909f81bc6a788e3
The Android Open Source Project [Wed, 10 Nov 2010 00:10:41 +0000 (16:10 -0800)]
merge from open-source master
Change-Id: Ie58d6e47c7024135b097279b2e33d66a86c4d5a5
Xavier Ducrohet [Wed, 10 Nov 2010 00:04:34 +0000 (16:04 -0800)]
Merge "New layoutlib API."
Xavier Ducrohet [Tue, 9 Nov 2010 02:13:22 +0000 (18:13 -0800)]
New layoutlib API.
This is the new API to move to a stateful layoutlib, allowing
for faster actions on an inflated layout.
Change-Id: Ice6324c056efc6e82d5760b5f4e3d40b58938368
The Android Open Source Project [Tue, 9 Nov 2010 23:24:38 +0000 (15:24 -0800)]
merge from open-source master
Change-Id: I8f32a2192c0fe5b95b45c2cc12751454c533dfbc
Tor Norbye [Tue, 9 Nov 2010 21:31:18 +0000 (13:31 -0800)]
Merge "Don't unregister listeners from disposed widget"
Tor Norbye [Tue, 9 Nov 2010 20:38:50 +0000 (12:38 -0800)]
Merge "Fix icon painting transparency for the palette"
Tor Norbye [Tue, 9 Nov 2010 17:28:12 +0000 (09:28 -0800)]
Fix icon painting transparency for the palette
The icons shown in the palette do not have transparency applied to
them, which means that you end up with white squares on a white
background. This looks okay in the outline view where the icons are
shown on a white background, but it does not look good in the palette
where they are on a gray background.
This changeset fixes the icon generation a bit such that it records a
transparent pixel for these icons. It's not an ideal solution since we
only have on/off transparency, not an alpha channel, which means that
we can't have a smoothly anti-aliased edge of the circles regardless
of the background. Luckily, a light color seems to work fine for both
cases.
While I was at it I also adjusted the font positioning slightly on the
Mac platform for some letters that needed it.
Change-Id: Idf5a4f6709096935122bfe05cfecffc63e74a863
Tor Norbye [Tue, 9 Nov 2010 01:14:52 +0000 (17:14 -0800)]
Don't unregister listeners from disposed widget
This changeset fixes a couple of exceptions on shutdown which stem
from the fact that once a widget is disposed it's an error to attempt
to remove listeners from it.
Change-Id: Ie4b1049668805c6e9bbedd1f7f0cf480e2d68c9d
The Android Open Source Project [Mon, 8 Nov 2010 21:46:29 +0000 (13:46 -0800)]
merge from open-source master
Change-Id: Ie8820121c32589443f5d53099de2f04f4753d9f7
Tor Norbye [Mon, 8 Nov 2010 21:41:23 +0000 (13:41 -0800)]
Merge "Add autoformatting of XML, and improved manual formatting"
Tor Norbye [Fri, 5 Nov 2010 20:56:04 +0000 (13:56 -0700)]
Add autoformatting of XML, and improved manual formatting
This changeset improves the formatting of XML edited by the layout
editor in two ways:
(1) It improves the way the layout editor handles insertion and
deletion into the XML document; it looks up the indentation of the
sibling and parent elements and attempts to correctly indent new
elements based on the existing surrounding formatting, and it also
attempts to clean things up correctly on element deletion.
(2) It adds a new user option for turning on automatic XML
formatting. When this is on, it will invoke the Eclipse XML formatter
on portions of the XML after each edit. This will ensure that the
document adheres to the user's preferred formatting settings (maximum
line width, tabs versus spaces, line breaks before attributes, etc.
Change-Id: I74f9a4240a8c5ca4295c01f3b55751ef10b1c1b0
The Android Open Source Project [Sat, 6 Nov 2010 01:14:03 +0000 (18:14 -0700)]
merge from open-source master
Change-Id: I82e33d808bac10d4f63b5379ee9367091865fde3
Tor Norbye [Sat, 6 Nov 2010 01:07:51 +0000 (18:07 -0700)]
Merge "Sort palette contents"
Tor Norbye [Fri, 5 Nov 2010 23:59:55 +0000 (16:59 -0700)]
Sort palette contents
The palette has many of the Android views in a seemingly random
order. This changeset ensures that they are ordered alphabetically.
Change-Id: I675265747e7835c933fe8e2c7f99dc3c64e6bfaf
The Android Open Source Project [Fri, 5 Nov 2010 20:59:49 +0000 (13:59 -0700)]
merge from open-source master
Change-Id: I6e2470258fa36fadb41b5de4aa0156f272f34ad0
Tor Norbye [Fri, 5 Nov 2010 20:54:47 +0000 (13:54 -0700)]
Merge "Mark internal strings as NON-NLS in rule classes"
The Android Open Source Project [Fri, 5 Nov 2010 16:54:25 +0000 (09:54 -0700)]
merge from open-source master
Change-Id: I83cf28d9bdef00e1f1ac5b1663e2faeeba0930ea
Tor Norbye [Fri, 5 Nov 2010 00:20:24 +0000 (17:20 -0700)]
Mark internal strings as NON-NLS in rule classes
Mark internal strings as NON-NLS in rule classes. This code was
initially written in Groovy which is why it didn't have NON-NLS
markers.
Change-Id: I74517771271e54f165332543092a9d29fc2bc52a
Tor Norbye [Fri, 5 Nov 2010 16:44:15 +0000 (09:44 -0700)]
Merge "Remove deprecated UiElementNode "editData" property"
Tor Norbye [Fri, 5 Nov 2010 16:43:20 +0000 (09:43 -0700)]
Merge "Add gesture support, marquee selection, and refactoring"
Tor Norbye [Fri, 5 Nov 2010 00:56:13 +0000 (17:56 -0700)]
Remove deprecated UiElementNode "editData" property
As requested in another review (#18753) the editData property on
UiElementNodes is obsolete (it was used by GLE1) and should be
removed. While there I also updated the naming style of local vars in
that class from underline to camelcase.
Change-Id: Ic5c50d07abedb1177cd018c866901f1e54cd0ec5
The Android Open Source Project [Fri, 5 Nov 2010 00:31:00 +0000 (17:31 -0700)]
merge from open-source master
Change-Id: I22daa7f51698f7a4f873f7c52a10845e2cd9f097
Tor Norbye [Fri, 5 Nov 2010 00:28:45 +0000 (17:28 -0700)]
Merge "Fix XML editing whitespace handling"
Tor Norbye [Tue, 26 Oct 2010 15:54:15 +0000 (08:54 -0700)]
Add gesture support, marquee selection, and refactoring
This checkin adds support for gestures and overlays. Gestures are
sessions of mouse/keyboard activity, and this is documented in the
javadoc for the new Gesture class. Overlays are units of graphics, and
these are documented in the Overlay javadoc. The gesture architecture
lets us isolate the logic for each different type of operation
(marquee, resize, move, etC), and with associated overlays we don't
attempt to for example paint drag feedback during a resize operation,
etc.
The checkin also adds marquee selection (as a second gesture, in
addition to the existing drag & drop based move gesture), along with
some associated changes in how the root view is treated.
As part of isolating the mouse handling and painting related to
gestures, painting etc., I also refactored the code quite a bit.
LayoutCanvas which used to be a large class has been split into a
number of new classes, one for each area of responsibility:
- The mouse listener and drag & drop code has been moved into a
GestureManager. (A lot of the drop handling code also came from the
CanvasDropListener class.)
- Code related to maintaining the set of rendered views, and
performing searches in the views, has been moved into a
ViewHierarchy class.
- Code related to selection has been moved into a SelectionManager.
- Various individual painting pieces (outline, hover, etc) have been
moved into individual Overlay classes such as OutlineOverlay,
HoverOverlay, SelectionOverlay, etc. This also moved associated
resource allocation and cleanup into the overlays.
- New coordinate classes, ControlPoint and LayoutPoint, are used
instead of ints and plain Points to make it really clear which
methods require coordinates in the layout (such as the
ViewHieararchy search methods) and which ones require coordinates in
the canvas control (such as paint methods). There are factory methods
to automatically construct the right kind of coordinate from
different types of mouse events, as well as methods to convert
between the two.
I also tweaked the visual appearance of selection a bit more, and
some other misc cleanup.
Change-Id: I666aabdcd36720bebe406b68237e8966d985fb8f
The Android Open Source Project [Thu, 4 Nov 2010 20:08:38 +0000 (13:08 -0700)]
merge from open-source master
Change-Id: Id333af467c0ba37653e1637ec729c8e6a722a721
The Android Open Source Project [Thu, 4 Nov 2010 19:56:07 +0000 (12:56 -0700)]
merge from tools_r8
Change-Id: I7bc7385266c44927db9dc66eed3b06e92eaf99e1
Raphael Moll [Thu, 4 Nov 2010 19:51:44 +0000 (12:51 -0700)]
Merge "SDK Repo Schema: <vendor> for <extra> elements." into tools_r8
Tor Norbye [Thu, 4 Nov 2010 03:16:09 +0000 (20:16 -0700)]
Fix XML editing whitespace handling
This changeset fixes three problems related to the way whitespace is
handled by the visual editor.
(1) The editor would insert a newline text node after a newly inserted
element, but this element was appended rather than inserted
immediately after the element, which meant that if you inserted your
element anywhere in the *middle* of the child list, you would
accumulate blank lines at the end of the parent's element and have no
separator before the current element.
The fix is simple - use insertBefore() rather than appendChild() when
inserting the new node.
(2) On deletion, no XML text nodes were deleted. This means that if
you inserted 4 elements, then deleted them, you would end up with 4
blank text nodes.
The fix here is to look at the sibling when we are about to delete,
and if it looks like a pure whitespace node, remove it as well.
(3) When nested content (like a LinearLayout) was inserted, there
would be no newline inserted before the child, so that first element
would end up on the same line as the parent.
The fix here is to detect this scenario (when we are inserting an
element into an element that has no children) and insert a newline
*before* the element (as well as after, as is the case for all newly
inserted elements).
Longer term we should do more advanced things with formatting, such as
indenting nested content, and making sure that when we insert and
remove whitespace nodes we always adjust the indentation
correctly. But for now, this changeset makes the XML generated by the
editor much more readable and consistent.
Change-Id: I2e65152568092a775074a606e3f5e54c680611c6
Raphael Moll [Wed, 3 Nov 2010 21:12:47 +0000 (14:12 -0700)]
SDK Repo Schema: <vendor> for <extra> elements.
Change-Id: I8fa13d28b787e3ecb8bd96896e6410313e2a66a9
The Android Open Source Project [Sat, 30 Oct 2010 00:23:44 +0000 (17:23 -0700)]
merge from open-source master
Change-Id: I59da9844f561bca215c90306f3942ad070d0a6d0