Commit Graph

1120 Commits

Author SHA1 Message Date
Android (Google) Code Review
b7e69d20a4 Merge change Ic8fe0b36 into eclair
* changes:
  Add 3 more rules to layoutopt/uix: - InefficientWeight - NestedScrollingWidgets - TooManyChildren
2009-10-05 21:07:00 -04:00
Romain Guy
4796120e05 Add 3 more rules to layoutopt/uix:
- InefficientWeight
- NestedScrollingWidgets
- TooManyChildren

Change-Id: Ic8fe0b36e0a7cac523d223e5f8d96d7959919da6
2009-10-05 18:05:44 -07:00
Xavier Ducrohet
24bf2fa3e4 Add tests from layoutlib to adt-tests
Change-Id: Ia7bac7fad90b77fe34fb4a4371d6d5945993efe9
2009-10-05 15:57:17 -07:00
Android (Google) Code Review
b6e85c0548 Merge change Ieb4e722b into eclair
* changes:
  Add sdklib tests to the adt-tests Unit tests.
2009-10-05 17:45:04 -04:00
Android (Google) Code Review
6cc64cd26d Merge change I90b4c0e7 into eclair
* changes:
  Fix Eclipse sample tests.
2009-10-05 17:26:31 -04:00
Brett Chabot
071276efbd Fix Eclipse sample tests. 2009-10-05 13:39:38 -07:00
Xavier Ducrohet
b7d28abce3 Add sdklib tests to the adt-tests Unit tests.
Change-Id: Ieb4e722b1b5a29cef250e2cb5575a71e09f956c3
2009-10-05 13:01:11 -07:00
Android (Google) Code Review
e96bc57aad Merge change I7d761ffa into eclair
* changes:
  Fix best match resource selection when there's only one match.
2009-10-05 15:29:16 -04:00
Xavier Ducrohet
98fcd41e1f Fix best match resource selection when there's only one match.
Was using the wrong index.

Change-Id: I7d761ffa553f0aeec176a4752185dde238991e5e
2009-10-05 12:15:08 -07:00
Romain Guy
06d3ec157e Only process XML files in layoutopt.
Change-Id: I847109409601ccfbb10abff3b9972afdb3032821
2009-10-05 12:08:48 -07:00
Romain Guy
5a31898020 Add new rules to layoutopt: UseCompoundDrawables and UselessLayout.
Change-Id: I5dfb2567d923da8442b1df1e703e4ebca6e9523b
2009-10-05 11:59:21 -07:00
Android (Google) Code Review
06f70393bd Merge change I8e4697e1 into eclair
* changes:
  New layout optimization tool. Run layoutopt on the command line.
2009-10-05 07:13:21 -04:00
Romain Guy
3958d08fd4 New layout optimization tool. Run layoutopt on the command line.
Change-Id: I8e4697e19ca8a203dc8a41b464f7cb46d52184b0
2009-10-05 03:48:33 -07:00
Android (Google) Code Review
1061c0c7dc Merge change I69afafa4 into eclair
* changes:
  ADT: Create project from existing sample in New Project Wizard
2009-10-02 22:52:31 -04:00
Raphael
badc593c5e ADT: Create project from existing sample in New Project Wizard
The UI workflow:
- user selects the new "Create project from existingsample" radio button
- user selects an SDK target in the NPW
- a popup is filled with all available samples

This also fixes 2 edge cases:
- when the selected sample contains a build|default.propertie that is
  a base of the currently selected SDK target, don't reset it.
- when the user manually changes the project name or the app name for
  the sample, simply empty the fields and the next selected sample
  will recompute the adequate names. Any non-empty user input is never
  overridden.

SDK BUG 2121819

Change-Id: I69afafa460b86942046ef6baca3d4c7ee7dbe97d
2009-10-02 19:47:26 -07:00
Xavier Ducrohet
90ee703e94 Fix resource resolution in the graphical layout editor.
Resource with qualifiers take precedence over the ones without
even if the qualifiers are not present on the requested configuration.

Change-Id: I0d19889064e8031179ea6ee13c93a4198fe971fd
2009-10-02 19:07:09 -07:00
Xavier Ducrohet
d280d2363e Monintor resolution/size chooser dialog
This simple dialog lets the user choose a screen size (from a fixed list) and
a resolution (as returned by SWT's Display class).

This is used by the AVD start options dialog to help users figure out
the pixel density of their monitor.

Change-Id: I3eec0e7fac850c82e836d2bc0291a491f29f516e
2009-10-02 15:16:06 -07:00
Xavier Ducrohet
d13d440d43 Emulator launch options dialog.
This is displayed when clicking the Start button in the AVD manager.

The dialog allows to easily scale the emulator to match an arbitrary screen size
and to wipe the user data if needed.

The required monitor dpi is computed using java.awt.Toolkit, but (at least
on MacOS) it doesn't return the correct value, so it can be user supplied.
It's stored at least while the app is running and if possible in the settings
of the ADV/SDK Manager/Updater.

The wipe-data and scale flags are stored and reused while the app keeps
running as well.

Change-Id: Ia2f3ff5f4de285a3d505c6914d6b89cc663be284
2009-10-02 12:35:10 -07:00
Xavier Ducrohet
f073703057 Fix Android Manifest parser.
While the test is in the java package as the parser, it's in a different
plug-in and this prevents accessing package-protected methods.

Change-Id: Ib17765095e4da518d62ee65cb9e1987d0e22be6e
2009-10-01 17:23:25 -07:00
Raphael
2ace885b29 ADT Manifest Editor: Fix for uses-sdk dup that won't go away.
It was a display issue only, meaning the actual XML node was
being deleted but the Ui model was not updated properly. The
actual cause is that this is a mandatory node, and mandatory
nodes must stay as "fake nodes" in the Ui model. However
only one such node needs to stay in the hierarchy.

SDK BUG 2147112

Change-Id: I68e3d343bb95169865ad8dcad77004cbd51fafc3
2009-10-01 14:17:02 -07:00
Xavier Ducrohet
227b8768fa Load default GLE device profiles from the SDK.
Change-Id: Ife64397692912f892ec81af8237ac31914830be9
2009-09-30 23:01:19 -07:00
Xavier Ducrohet
91175e6fdd am 69940e9b: Merge change I77069a1e into eclair
Merge commit '69940e9babbdf06c3a9942c4fbdd507479c847c9' into eclair-plus-aosp

* commit '69940e9babbdf06c3a9942c4fbdd507479c847c9':
  Replace icon template with new style and multiple densities.
2009-09-30 21:32:17 -07:00
Android (Google) Code Review
69940e9bab Merge change I77069a1e into eclair
* changes:
  Replace icon template with new style and multiple densities.
2009-10-01 00:23:41 -04:00
Xavier Ducrohet
739c75d4fa am cc004309: Add a copy button to the screenshot dialog.
Merge commit 'cc004309b4905d8b8c86d97d74b92ff0d78c0323' into eclair-plus-aosp

* commit 'cc004309b4905d8b8c86d97d74b92ff0d78c0323':
  Add a copy button to the screenshot dialog.
2009-09-30 21:17:05 -07:00
Xavier Ducrohet
8677a1704e Replace icon template with new style and multiple densities.
The icon in the templates of ADT was medium density only.
I added new densities (high and low), as well as updated to
the new Eclair style. Also added a version for Ant project.

Updated ADT and sdklib to deal with creating new projects
with all 3 icons.

In case of Ant project, this is done only if the icons
are present in the target platforms.

For ADT, this is done only if the project target donut
or later. Older project still have only one icon located
in drawable/

Change-Id: I77069a1e4902ef395d490526aabc40a26e33d4ca
2009-09-30 20:46:00 -07:00
Xavier Ducrohet
cc004309b4 Add a copy button to the screenshot dialog.
This adds the screenshot to the clipboard.

Change-Id: I3509f2e5471588d749d67b70dd4d674cd0cd2057
2009-09-30 18:21:52 -07:00
Xavier Ducrohet
dcec68b99c am 363c023b: Merge change Ie905f9b5 into eclair
Merge commit '363c023be195d943859d3dfc775a453b6791ae4b' into eclair-plus-aosp

* commit '363c023be195d943859d3dfc775a453b6791ae4b':
  Add support for xdpi and ydpi in the device config for the GLE.
2009-09-30 13:24:26 -07:00
Xavier Ducrohet
f0303d8d5c Add support for xdpi and ydpi in the device config for the GLE.
Change-Id: Ie905f9b586ac5f58e40e86232fbafeaacf6a0c51
2009-09-30 11:57:36 -07:00
Raphael
4db669b91e am 603899e5: Merge change I95a34d28 into eclair
Merge commit '603899e5a9c50bcfd2149c7932050fda0524ec6b' into eclair-plus-aosp

* commit '603899e5a9c50bcfd2149c7932050fda0524ec6b':
  ADT XML String Refactoring: fix refusing to edit @+id/blah.
2009-09-29 18:36:11 -07:00
Android (Google) Code Review
603899e5a9 Merge change I95a34d28 into eclair
* changes:
  ADT XML String Refactoring: fix refusing to edit @+id/blah.
2009-09-29 21:05:44 -04:00
Xavier Ducrohet
c41c521cf3 am fa4fb905: Merge change I96ff4429 into eclair
Merge commit 'fa4fb905877d879f2a593e0726108784f204dc5d' into eclair-plus-aosp

* commit 'fa4fb905877d879f2a593e0726108784f204dc5d':
  Add support for 'android update test-project'.
2009-09-29 16:54:24 -07:00
Android (Google) Code Review
fa4fb90587 Merge change I96ff4429 into eclair
* changes:
  Add support for 'android update test-project'.
2009-09-29 19:46:01 -04:00
Raphael
c737e421e9 ADT XML String Refactoring: fix refusing to edit @+id/blah.
It correctly only refuses to edit @string/blah now.

This CL also does a bit of refactoring; I extracted some methods
and a class to make it a bit easier to read.

BUG 2066460

Change-Id: I95a34d28d6390ab0cc075f05ea83ceec04993ae9
2009-09-29 16:43:53 -07:00
Raphael
e73b8485a9 am 5ea7700f: Merge change Id5af7cf2 into eclair
Merge commit '5ea7700ffa5ee22012f88255f62aa4af7a1b840c' into eclair-plus-aosp

* commit '5ea7700ffa5ee22012f88255f62aa4af7a1b840c':
  Add xdpi and ydpi to layout-configs XML Schema.
2009-09-29 15:13:11 -07:00
Raphael
9b8a8056d1 Add xdpi and ydpi to layout-configs XML Schema.
Also validate that whitespace around tokens is accepted.

BUG 2138329

Change-Id: Id5af7cf2b0689f05327a0cf0b17a525ceba78a12
2009-09-29 14:41:45 -07:00
Xavier Ducrohet
0287e8dc76 am 1028accb: Merge change Ic86de6e9 into eclair
Merge commit '1028accb55919c0a84a4871002efb19a202c475c' into eclair-plus-aosp

* commit '1028accb55919c0a84a4871002efb19a202c475c':
  Fix NPE when opening new layout file.
2009-09-29 10:18:55 -07:00
Xavier Ducrohet
596f3b8d91 Fix NPE when opening new layout file.
When adding the parsing of the device XML files, I mostly tested with a
layout file already opened when Eclipse launched.

Well it turns out there's a slightly different code path when opening a file
*after* Eclipse has launched. The load of the device UI in the config
selected caused a rendering before the XML model was loaded which ended
up in an NPE in the recomputeLayout method.

Additionnally, I hadn't finalized the code for the GLE2, so this brings it
in line with the GLE1.

Change-Id: Ic86de6e91ca13793aceecb5706bc963edddb9241
2009-09-28 17:59:25 -07:00
Xavier Ducrohet
cc02b85ba6 Add support for 'android update test-project'.
This is only to be used to update the location of the main project.
To update other properties, 'update project' can be used.

Change-Id: I96ff44295460c7e331953263abccea17108d5a70
2009-09-28 16:30:13 -07:00
Xavier Ducrohet
ebe66dfea9 am 9e4715e6: Fix ADT to use the new sdklib API
Merge commit '9e4715e6d94e300605ab845c2e68bddaf8c23c8f' into eclair-plus-aosp

* commit '9e4715e6d94e300605ab845c2e68bddaf8c23c8f':
  Fix ADT to use the new sdklib API
2009-09-28 14:41:39 -07:00
Xavier Ducrohet
9e4715e6d9 Fix ADT to use the new sdklib API
ManifestConstants got renamed AndroidManifest but I
forgot to update ADT.

Change-Id: I60d40c63a67968c31789e91f14020c61114907ca
2009-09-28 14:32:34 -07:00
Xavier Ducrohet
064380b1ed am 7d762002: Merge change I097b444e into eclair
Merge commit '7d76200234bace44816f6328d2327ffb9d9c0a18' into eclair-plus-aosp

* commit '7d76200234bace44816f6328d2327ffb9d9c0a18':
  Fix ApiDemo Layout rendering test
2009-09-28 14:00:18 -07:00
Android (Google) Code Review
7d76200234 Merge change I097b444e into eclair
* changes:
  Fix ApiDemo Layout rendering test
2009-09-28 16:49:09 -04:00
Xavier Ducrohet
8d33f4a821 Fix ApiDemo Layout rendering test
The issue came from a lack of device configuration and
missing default versions of some resources. We know use
an ADP1 configuration to choose the resources used by
the rendering.

Change-Id: I097b444e4fdc5572cfc53293a3215f1382f5d49c
2009-09-28 13:47:49 -07:00
Xavier Ducrohet
8f60888662 am eafb009b: Merge change I663d4cb7 into eclair
Merge commit 'eafb009baf48c876fa22409f862523966293d4d8' into eclair-plus-aosp

* commit 'eafb009baf48c876fa22409f862523966293d4d8':
  Update the project creation (from the command line):
2009-09-28 13:40:06 -07:00
Xavier Ducrohet
947561b337 am c124b2ab: Merge change Ib1b01007 into eclair
Merge commit 'c124b2ab7bb228a3363535c6697708a82016ce70' into eclair-plus-aosp

* commit 'c124b2ab7bb228a3363535c6697708a82016ce70':
  Parse add-on supplied layout devices.
2009-09-28 13:40:02 -07:00
Android (Google) Code Review
eafb009baf Merge change I663d4cb7 into eclair
* changes:
  Update the project creation (from the command line):
2009-09-28 16:33:57 -04:00
Android (Google) Code Review
c124b2ab7b Merge change Ib1b01007 into eclair
* changes:
  Parse add-on supplied layout devices.
2009-09-28 16:29:25 -04:00
Xavier Ducrohet
708c5b4fa4 am e6ca35d4: Fix ResourceQualifier tests.
Merge commit 'e6ca35d4b0adf8bff8ea8fbc68eb9da16e7f4689' into eclair-plus-aosp

* commit 'e6ca35d4b0adf8bff8ea8fbc68eb9da16e7f4689':
  Fix ResourceQualifier tests.
2009-09-28 12:33:55 -07:00
Xavier Ducrohet
e6ca35d4b0 Fix ResourceQualifier tests.
Change-Id: Ib6109c1bb76dadddeef24aec3af16e178a931651
2009-09-28 12:16:16 -07:00
Xavier Ducrohet
98b9c10e63 Parse add-on supplied layout devices.
Add-ons are expected to provide a file called devices.xml in their root
folder. The XML schema for this file is
	eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/layout-configs.xsd

I slightly fixed the schema so that normal screen size use the token
"normal" instead of "medium" to match the resource qualifier.

To round up the feature, the following changes are included:
- getEnum in the resource qualifier enum has been made public. There's no
sense in keeping it private and it'll help with people possibly using
valueOf which behaves differently (case sensitive so
ScreenSize.valueOf("normal") fails, while getEnum on the same string succeed.
- Updated the device configuration UI to deal with missing list of
devices while the SDK loads.

Change-Id: Ib1b01007d2ae7fd6398172c3549b2686c33d48be
2009-09-27 21:54:09 -07:00