| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Adds an exporter that will take a selection of projects and craete
Gradle build files, with a top-level settings.gradle project to
link them together, and a Gradle wrapper that lets them be built
without having to specifically download the right version of
Gradle.
Change-Id: Ic0fbeb7162b5ab80b1e0c8b70e050ced0c9a07c7
|
|
|
|
| |
Change-Id: I1a60ac1e683887dc4cecf8b18bdcf9def48f19a4
|
|
|
|
| |
Change-Id: I6da728d079975fa19f1ae816fa585031a9c6fe75
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset fixes a number of bugs with multi configuration
editing; especially around configuration switching and inheritance, as
well as some memory improvements.
It also synchronizes values between layout variations. If you for
example have layout-land/foo.xml and layout-port/foo.xml and you
change the Theme to Theme.Holo or the device to Galaxy Nexus, the
configurations for both files will be updated (whether or not the
files are open), and provided of course the layout folder doesn't
contradict it; layout-xlarge/foo.xml would be unaffected by the above
edit since Galaxy Nexus doesn't match the layout-xlarge folder.
Change-Id: I5c01555aad8339f68788d8aed1f707d30993ae1b
|
|
|
|
|
|
|
|
| |
This changeset adds support for previewing other
configurations (as well as including contexts)
for a layout, with live updates.
Change-Id: Iff3523d6f5749b3287716e563330fb18c8576611
|
|
|
|
| |
Change-Id: Ic069160c1f6551238f50a13b3d206431a7284f5f
|
|
|
|
| |
Change-Id: I83f699da2a9d494938ee73fb2c274c5f8d5ac647
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Validate target location such that if the target
directory exists, the wizard complains.
Fix the icons for custom views and unit test projects
such that they have the "+" icon badge indicating that
something will be created. Update labels.
Replace the single theme defintion which references
DarkActionBar such that we have 3 styles, one for pre-11,
one for 11-13 and one for 14+ which define the relevant
light themes.
Remove the unused dimensions in blank projects.
Remove the (unused) "Include compatibility code" toggle.
Change-Id: I3d42c9544170c7a33754b0e410e9f1421d5c323b
|
|
|
|
| |
Change-Id: I9023c937b757277962730aa664d8d3a0be85e830
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset improves the lint integration in the layout editor in
the following ways:
- The outline now shows error or warning indicators in the bottom left
corners of the icons for any specific views that have one or more
lint warnings associated with them. There is a tooltip if you hover
over the icon which displays the lint message.
- The layout editor canvas displays little warning indicators in the
bottom right corner of the views (provided the views are larger than
the icons; e.g. empty layouts, as well as views that are zoomed out
very far will not show lint indicators).
- There is a tooltip hover in the canvas as well. In order to avoid
obscuring content, it shows up at the bottom of the view. It might
also show multiple lines: one for each lint warning in a view near
the cursor. (This is important if you for example have a warning
both on a layout and a widget inside that layout.)
- The error indicator in the upper right corner, which used to be a
(too small) warning icon is instead an issue count now. Clicking on
the issue count opens up the lint file dialog.
- The lint file dialog now contains a button to suppress issues by
attributes (and fixed some other minor bugs related to keeping
expanded categories expanded across refreshes and setting an initial
selection).
- Lint is run automatically when the layout is opened up (3 seconds
after the first successful render). This makes the error indicators
show up (until now, it would only run single-file-lint after the
first edit operation).
Change-Id: I306aca390d70bf025f5e86fc21ae7b6bc0036d8d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset replaces the configuration chooser with a new UI.
First, the two lines of comboboxes have been replaced by a toolbar,
which will wrap to two lines if it cannot fit on a single
line. However, it tries hard to avoid this scenario by using icons and
brief labels. For example, the rendering target is displayed as an
Android icon along with just "4.0" instead of "Android
4.0". Similarly, the "Other" locale is just shown as a globe icon, and
for example in the Device list "4.65in 720p (Galaxy Nexus)" is display
as just "Galaxy Nexus".
Second, the "current configuration" label is now a dropdown instead.
The text of the label displays the current configuration as before
(though using the brief name, e.g. "layout-land" instead of "Landscape
Configuration". In addition, it's a dropdown, and opening the menu
will display all other available configurations for this file. Thus,
if you have a special landscape version and a special tablet version
of a particular layout, the menu will contain default, landscape and
tablet (where the menu items display the full configuration names such
as "Landscape Orientation"). In addition, the configuration menu also
contains "Create New...", which is the new location for the Create
button which used to be in the toolbar itself.
Third, there is a new "Activity" dropdown. This displays the current
activity associated with this layout, next to an Eclipse "class" icon.
It is initially populated with our best guess of what the activity
is. The chosen activity determines which theme is initially assigned
to a layout (for example when there is a Manifest registration of a
theme to an activity). In the future we will use this facility to
drive other features as well, such as preview rendering the action bar
(where we need to know the associated activity) or assisting with
creating click handlers. The Activity dropdown menu also contains a
"Open <Activity class>..." action for jumping to the associated Java
code. The chosen activity is persisted as an XML attribute in the
layout so it should be preserved across IDE sessions and shared among
developers.
Fourth, all the dropdown menus are now native SWT menus rather than
dropdown menus, which means we can use icons, proper separators, and
nesting. The locale menu now shows flag icons next to each region (and
when a locale is chosen the corresponding icon is shown in the
configuration toolbar). In the Theme menu we no longer need to use
"-------" ASCII separators, we can use proper native menu separators
instead. And the Theme menu is now nested; rather than a really long
list of options, the menu is grouped into related sections:
* Currently selected theme
* Project Themes >
* Manifest Themes >
* Holo Themes >
* Holo.Light Themes >
* DeviceDefault Themes >
...
* All >
* Open "<current theme>" Declaration...
Fifth, the device configuration combobox has been replaced by three
inline icon radiobuttons, showing portrait, landscape and (if enabled)
square. This makes it easy to switch orientation through a single
click.
Sixth, the UI mode (Normal/Car/Dock) and Night mode (Day/Night) are no
longer directly shown in the configuration chooser since they are not
used frequently enough to warrant persistent space in the always
visible toolbar. Instead, there is an "Edit Configuration" icon on the
left you can click which brings up a full editor dialog where all the
previous combo boxes appear, along with the generic configuration
qualifier selection dialog. Here you can make more specific edits to
the current configuration state.
There are various fixes as well. For example the whole toolbar is
hidden during platform data loading and made visible at the end. When
creating a new configuration file, that new configuration file is
opened after creation. We now track whether the current theme (stored
in the IDE persistent property) is a project theme or a framework theme.
Change-Id: Ic8d9817c7bc4dbcae4535b6b9222393fb49cfde9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset improves the way the layout editor handles windows. In
particular, it attempts to make the property sheet and the outline
more visible.
Specifically:
* It adds the WindowBuilder docking support, which offers several
new features:
(1) You can collapse and expand the palette and structure views. If
you hover over a collapsed palette (for example) it temporarily
opens, and when you drag from it over to the canvas it collapses
again.
(2) The initial size is pixel based rather than percentage based, so
the default palette size is more reasonable on large displays
(it used to always take 20%, which was fine on a small screen
but a waste on larger screens).
(3) You can drag & drop to reconfigure the layout a bit. (This is
fairly limited though; in particular, you cannot drag these
views out of the editor area and mix them with Eclipse views.)
* When the property sheet view is not shown anywhere else, it is shown
as part of the outline instead (sharing the vertical space). This
works better for the new property sheet implementation since it
works better as a vertical window than a horizontal window.
* When the outline is not shown anywhere else, it is shown in a new
composite window *inside* the editor area. This mode is also entered
when you temporarily maximize the layout editor window.
* The layout canvas is auto-fit-zoomed when you enter and exit
maximized mode, as well as when you open or close docked windows
within the editor.
The goal is for these changes to offer a good layout editing
experience with the outline views and property sheets *without* using
a new perspective for layout editing. Note that this is not identical
to what WindowBuilder does; they always embed both the palette and the
structure views within the editor area, which means the structure view
is typically redundant with the outline view on the right unless you
maximize the view. With the approach above hopefully we'll avoid that
case and you'll always see the views without redundancy (and therefore
with more available space for the layouts).
Change-Id: I0d338b2781b9732e992f088fcc4e1ba46ff0954f
|
|
|
|
|
|
| |
This reverts commit 27dac06bfc4297dc9a018edc534f44ecf96cd724.
Change-Id: I6708bd4091f0cb677484669479357d479b9db5fa
|
|
|
|
| |
This reverts commit a7621238bf0202419677380ee3a268142358df83.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The WindowBuilder propertysheet has been extracted and added as a
library in external/eclipse-windowbuilder/.
This changeset removes the old propertysheet code (which used the
builtin Eclipse property sheet page), and replaces it with the
WindowBuilder one, along with new code to aggregate the properties
into some categories, as well as tagging some of the properties as
advanced. (This was computed by running the same analysis scripts used
to produce the most-frequent attributes (sdk/attribute_stats) and
instead computing which attributes are used very infrequently or not
at all in some representative sample code.)
The WindowBuilder propertysheet gives us the following new features:
- Highlighting (bold) of important attributes
- Masking (and when included, shown in gray italic) of advanced
attributes
- "Complex" attributes with nesting, used to for example aggregate all
the layout parameters into a single node, and the margin layout
attributes within those
- Tooltips over the attribute names, not values, so they never obscure
content
In addition, this changeset adds custom implementations of properties,
property editors and property dialogs for the core Android property
types (XML strings, flags and booleans), which adds the following new
features:
- Preview rendering of color and image resources inline
- Display of -default- attributes (those not specified in XML) using
the layoutlib facility getDefaultProperties() to render the implied
attributes. For example, if you look at a Button, it will show you
that the implied value of "Text Color Link" is
"@android:color/holo_blue_light" even though it is not set.
NOTE: This only happens for attributes that were actually queried by
the widget during rendering. Attributes that are not used by the
widget have no (displayed) value. Thus, EditText-specific attributes
in a TextView are not shown when a non-EditText TextView is
selected.
- Evaluation of the attributes. In the above example, in addition to
showing @android:color/holo_blue_light, it will chase down the value
of this to for example render a blue square next to the value. For
drawables it will render a thumbnail, and for String resources it
will display the actual value in parentheses.
- Field completion in text fields, completing all resource strings
(@string, @android:string, etc), as well as flag values. Enum values
are chosen in a dropdown.
- Checkbox support for boolean values, allowing you to click through
the three values true, false and null.
- Our custom version of the Property Sheet Page allows you to
expand/collapse all properties, and it also has an option letting
you switch between Alphabetical Sort (where all attributes are in a
flat table, sorted alphabetically by property value), or
hierarchical sorted "by category". Currently the categories are
simply the defining views, plus 2 more (layout parameters and
deprecated attributes). When we get more metadata, it would be nice
to switch these to more logical categories, such as "text",
"scrolling", "focus", etc. (There is some preliminary support for
this in the code, but since the defining-view categories seem to
work better those are used instead right now.)
Change-Id: Ie4959a3a2c36c083dcc1ba19a70f24b33739fe2f
|
|
|
|
|
|
|
| |
Also fix the paste operation to target the parent if
the paste target does not accept children.
Change-Id: Id084db376e5ff9b4a374e6d2145bc890a925a078
|
|
|
|
| |
Change-Id: If1d294fdb5b487df91368716052d336c8f5c0589
|
|
|
|
|
|
|
|
| |
This changeset updates the palette icons to new ones contributed by
Herculano Campos. In addition to the palette, it also updates the
canvas zoom control buttons.
Change-Id: I03ffb683a4e0e82f5656eadc3cf769aedfb918e8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds a new toolbar button to the Lint View: "Suppress
this error with an annotation/attribute". This is enabled when the
selected warning is for a Java or XML file, and it adds the annotation
or suppress attribute in the relevant source file for the warning.
It also adds some handling to preserve the expanded tree state in the
Lint View when the view is refreshed, which happens automatically
whenever a fix is applied or a file is saved and the marker set
changes.
Change-Id: I393ee5f6e062a0e08a7e9457a03f37d8899a4df8
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds a new marker resolution for adding @SuppressLint
annotation (or modifying an existing @SuppressLint) in the method,
field or class surrounding a lint warning. It searches up in scope
and adds one suggestion for each enclosing applicable scope.
This changeset also makes the suppress id's be case insensitive such
that a codestyle similar to the one used by @SuppressWarnings is
possible.
Change-Id: I0a6a80c4e2d526f1c8fc6aedd95674a25e6a22f0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset makes a bunch of changes to the Lint Window
in Eclipse:
* First, it changes the view from a flat table into a hierarchical
tree. For any given type of error, there is one top level tree
node, and its children are the remaining occurrences of the same
error.
This makes it much easier to quickly skim through the different
issues without having to scroll; if you see an error you want to
fix, you can expand the node to jump to all the various occurrences.
The top level labels also include a count in the form of "(2 items)"
after the error message so you can get a sense of how many warnings
were found for each type.
* Second, it adds a bunch of new actions to the Lint View toolbar:
expand, collapse, configure (more on that later), settings, and
ignore file and ignore project (ignore global was already there).
It also updates the icons for some of the existing actions; the lint
toolbar action and window should look a bit better now.
* Third, it adds more columns (such as priority and category) to the
lint view, and makes the set of visible columns configurable. You
can click on the Configure toolbar action to bring up a dialog to
show which columns are included, and this selection is persisted
across IDE sessions (and it also persists the column sizes).
Furthermore, instead of separate file, path and line number columns,
there is now a new "Location" column, which is shown by default
instead of the separate file, path and line number columns. This
column displays combined info for all three: the file name, the line
number, the parent folder and the project name. This includes all
the relevant information in a more compact format such that there is
more room for the error message.
* Fourth, the table now supports sorting: you can click on any column
header, and the table will be sorted using that column as a
key. (This is not alphabetical but a logical sort defined for each
column; for line number and priority it's obviously numerical, but
for the default column it continues to be a combination of severity,
priority, issue type etc.)
Change-Id: I42695988780b493ad90aff5aeb5895e0fd8d3998
|
|
|
|
|
|
|
|
|
| |
Add an icon, a palette registration and palette preview rendering
config for the Holo "switch" widget. Also add some code to more
gracefully handle the case where switches are used with non-Holo
themes (set tag such that the "right theme?" message appears.)
Change-Id: I269e99a5d1184820d3d2ea96816f338514175ffa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds a new Lint View in Eclipse (available under Show
View in the Android category), which is a specialized view to view
lint warning markers.
This view opens automatically when you run Lint on a project. (The
view code is also shared with the single-file view shown when you
bring up the lint warnings from the layout editor.)
The lint view is similar to the Problems View (where lint markers also
show up), but with the following advantages:
(1) When you run lint, this view shows *only* lint warnings for the
project, rather than being mixed in with Java warnings etc from
this and other projects.
(2) The issue sorting is different here than in the Problems view: the
results normally sort in order of priority, category, issue type,
file and line number.
(3) The view contains a text area which displays more information for
the currently selected issue, such as the detector summary and
issue full explanation.
(4) The view toolbar has dedicated lint actions, such as a Fix
lightbulb to run the associated fix (if any), an Ignore Type
button for suppressing the selected type of issue, and Remove and
Remove All buttons for clearing markers. And of course a "Refresh"
button for re-running the analysis.
Change-Id: If58462d3eea198c07330ed9847f00925f346abaa
|
|
|
|
|
|
|
|
|
| |
The Available Width, Available Height and Smallest Width qualifiers
were missing icons (which are shown in for exmaple the Create
Configuration dialog). This changeset adds icons for these (which
also makes ResourceHelper.testGetIcon pass.)
Change-Id: I42c4e357245adc0b80320bac5fe1e173d1d0eaf3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an initial integration of the Android Asset Studio into
Eclipse, as a New Asset wizard. It uses the Java port of the Android
Asset Studio to generate the assets:
https://code.google.com/a/google.com/p/android-asset-studio-java/
It only supports launcher icons, and some of the configurable
parameters (file, shape, crop).
To run it, put the AssetStudioLib.jar file into the the adt libs
directory.
There's a new "Asset Set" wizard in the New wizard, which will open up
a two page wizard; the first page lets you select the project (which
it attempts to pick up from context), as well as the type of asset to
create, and the asset output name.
In the second page there are the various widgets to tweak the code
generator, and a preview area on the right which updates as you tweak
the various controls.
The main remaining work is to support additional asset types as
they are added to the assetstudio generator library.
Change-Id: I2e556337f8e5c3bc09e84b35a342ba05110abebc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds basic support for grid layouts:
- Freeform mode where you can drag & drop anywhere in the layout, and
guidelines are offered to align with other left boundaries, right
boundaries, baseline vertical alignment and center layout horizontal
alingment. In addition, it also offers "preferred spacing"
positioning, using the recommended distance between widgets.
Also, during a drag a regular 16x16 grid is also (faintly) shown and
(when there are no alignment matches as explained above) the
position snaps to this grid.
We also show the grid-structure (rows and columns, not the regular
snapping grid) during drags to make it more obvious that behind the
scenes there is a grid (because some other operations might shift
rows and columns so it's important to present the right user model.)
The freeform grid layout editor will automatically create rows and
columns and size them using spacers which are hidden from the user,
and on deletion these are automatically cleaned up as well.
- Grid mode where you can drag to any given cell, or between any two
rows or columns.
- Some layout actions for manipulating the grid (add/remove row and
column, adjust the gravity, toggle modes.)
This CL also contains various diagnostics code for the grid mode, and
does not yet correctly support dragging multiple views simultaneously.
Change-Id: Ie9ec54805039645e3db78d19095da86b04e44ca0
|
|
|
|
| |
Change-Id: I041fe4f6888dcc44f6f81319d05caed9311cc6ff
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds preliminary support for fragments:
* Add <fragment> to the palette, along with a drop handler which pops
up a class chooser to pick the Fragment class; all project
implementations of android.app.Fragment and
android.support.v4.app.Fragment are listed.
* Adds a fragment descriptor such that code completion works for
<fragment> elements
* Fix project callback such that it does not complain about a missing
class "fragment".
* Fix outline to display the name of the fragment rather than the
fragment tag name.
* This changeset also centers the label in MockViews since those are
still used to render fragments
Change-Id: I6e062970b335d9c95870f181ed408960978c423e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First and foremost, allow custom views to accept children such that
you can drag & drop children into the custom view in the outline.
Second, prevent an NPE which can occur if you drag into a layout where
the root element is a custom view.
Third, handle <view> (not <View>) better: provide a custom icon, and
inline the view class name in the outline label.
Fourth, allow double clicks (in addition to ctrl-click which is already
supported) on the custom views in the palette to allow jumping to the
custom view code.
Change-Id: I13c2bf2f4169185c9fcc893ce487f2abdac46802
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds a couple of focus related changes:
1) When the first text field is added into a layout, it is
automatically requesting focus
2) There is a new context menu item available on textfields to request
focus. When invoked on a text field, it will both add
<requestFocus> to itself and remove it from any other text fields
that have set it in the layout. When invoked on a text field which
already has focus, it will offer to clear the focus.
3) The Advanced section of the palette also contains the
<requestFocus> tag.
Change-Id: I92982b6dfc17315b3d513c304f258b8901a007a4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- ddms and (one of) hierarchy viewer perspective.
- feature about for traceview/hierarchyviewer
- use the draw9patch icon for the resource view in ADT
- use the emulator icon for the emulator control view in DDMS
- use the new android icon for the ADT wizard.
Also standardized on <toolsname>-<size>.png for the icon names.
ADT uses android-##.png
Change-Id: I1ce2a0dae5d256049b381552bd89aef717f51da6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset integrates a new set of application icons by Roman
Nurik for the various SDK tools: DDMS, Hierarchyviewer, Traceview, the
SDK manager, and the Eclipse about box icon.
We have new icons with the same visual look for draw9patch and
emulator as well, which are not integrated here. Draw9patch is written
in Swing, so it doesn't have a way to set a dock icon on the Mac
(other than with a startup script modification to pass -Xdock:icon,
which means we also need to bundle the .icns image outside its
.jar). I couldn't find the place the emulator dock image is set so I
will ask around and file a separate CL for that.
Change-Id: Idbb2212b8d0d5f1bd2d41b3576079ff409c7e9c8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds a new category to the palette, "Custom & Third
Party Views", which is populated with android.view.View subclasses
found in the current project (or any of its libraries), and in any
jars included by the project. They can be dragged directly to the
canvas, and control clicking on the palette entries will jump to the
source.
There are a bunch of adjustments in various places to make working
with custom views better - from ensuring that we don't use fully
qualified class names in default ids, to showing the Java class icon
for custom views in outline and elsewhere, to making zero-sized view
highlight and expand when selected like we do for laoyuts - since with
custom views it's quite easy to end up with an "invisible" view that
you can't see after dropping it.
There are also some fixes to the code which looks up third party and
custom views (which was already used by the Wrap In refactoring) - to
handle inner classes, to filter out non public or abstract classes,
and most importantly to only include views reachable from the current
project (since the view search necessarily is workspace wide.)
Change-Id: If1d8c7e5c7dd907a68d8d0962e85c5144e911503
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds new items to the palette which are just variations
of an existing widget but with different initial attributes. In
particular:
* Instead of just LinearLayout there are two versions of it:
LinearLayout (Vertical) and LinearLayout (Horizontal)
* The ProgressBar has 3 variations: Large, Small, and Horizontal. The
horizontal ProgressBar looks like the SeekBar, without at thumb, so
the SeekBar is moved next to the progress bar.
* There is a new palette category, "Text Fields", which contains a
number of different initializations of the EditText's "inputType"
attribute - for textual and numeric passwords, for names and e-mail
and postal addresses, for phone numbers, for negative and decimal
numbers, etc.
* Since LinearLayout is so common, the outline handles it specially to
ensure that we show a horizontal or a vertical icon depending on the
orientation attribute of the specific element rather than the
generic descriptor icon.
There are various changes to the palette icon preview and drag preview
etc to handle these changes. In particular, the category
initialization code had to be rewritten to be able to handle
variations (since for example the text field appears in multiple
categories, so the old assumption that each view had an assigned
category was no longer true.)
This changeset also extracts a constant for the "android:" literal
used in many places in the code, and renames the existing "android"
namespace constant.
Change-Id: Ibbc3dbd34c551594421c3de034cdccea6a66eba0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a menu button to the palette label line, as is done in most
Eclipse windows, which brings up the context menu for the
palette. This makes the palette modes etc a bit more discoverable.
(I played with adding a few dedicated toggle buttons there as well,
but it looked a bit odd because the palette toolbar is a few pixels
higher than the layout actions bar in the canvas, so visually things
looked misaligned; we'll need to address that before adding proper
action buttons in the palette title panel.)
Change-Id: I18906ee7c2ebede96f167925ee27a7064715fa8b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset makes a couple of changes for editing XML files:
First, it changes the code completion proposals for attributes such
that when the attribute is inserted, it is inserted along with ="",
and the caret is placed inside the double quotes.
Second, it changes the icons for attributes and elements to use the
plain Eclipse attribute and element icons rather than
first-letter-derived icons. This is similar to how Eclipse does icons
for other file types, like Java (where all methods just use a green
ball for example, rather than different icons depending on the method
name.)
(An exception to this are the view elements, where we have dedicated
icons for most of the view types. For these, the individual icons are
used.)
Change-Id: I3c6927ce772265c9c8cbd2260bdc74f5ca959f56
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset contains the following improvements to the palette:
1. Display modes. The palette now supports several different view
modes, and you can switch these via the context menu. The modes
are:
a. Previews. This renders previews for all the views using the
current SDK platform, theme, screen density, etc.
b. Small Previews. This is like (a), but scaled down to 75% size.
c. Tiny Previews. Like (a), but scaled down to 50% size.
d. Text + Icon. This shows an icon and the name of the view; this
is the same as what the palette has looked like before this
changeset.
e. Icons only.
All the modes, except for the Text+Icon mode, will lay out the
views in a row (with vertical centering) to fit as much as possible
in the available space for that category.
The view mode, along with other view flags described below, are
preserved across IDE sessions.
2. An accordion view. The palette is now using an Accordion control,
which means it by default will keep a single category open, and it
will always ensure that ALL the category labels are visible in the
current view without scrolling. Via the context menu you can turn
off the auto-close of the previous category. The accordion view
uses vertical scrollbars within each category content area, if
necessary.
The accordion view renders the category headers using open/close
folder icons, a bold font, and a background gradient which varies
between the normal and hovered states.
3. Categories. The category metadata is now used to organize the views
into a handful of different categories. The categories can be
enabled and disabled via the context menu. When you turn off
categories, you get all the views in a single large list.
4. Alphabetical sorting. By default, the views are now sorted
"naturally" (e.g. the metadata provided order, where important
views are listed first). You can switch it to alphabetical order
via the context menu, in which case the items are listed in
alphabetical order, either within their individual categories, or
if categories are turned off, the global view list.
This changeset also adds a new SWT ImageControl. This is necessary to
display the preview images, because the CLabel, which is usually used
to display images in SWT, is hardcoded to hide the icon if there is
not enough horizontal space to display the full label (even when it
has no text label), so for wide preview images the images would simply
disappear when the palette was resized.
Change-Id: I1e1fe051947809206ef9f3a2dfa2fbeae0341107
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When I generated the icons yesterday I forgot to update the background
layer; it had a flat gray background and in many cases extended a
pixel or two outside the widget foreground bounds.
This changeset updates this to have a nicer white-to-gray vertical
gradient. It also adds icons for the <merge> and <include> tags (not
used in the palette but can show up in the outline), and tweaks the
ScrollView and LinearLayout icons.
Change-Id: I1a887f7671d099918be7e63839ac76909ff554f6
|
|
|
|
|
|
|
|
|
|
|
| |
Add icons for all the remaining views, e.g. those that don't have
rendered previews.
A couple of these are scaled down icons from the platform (search for
search view, browser for web view, etc), and most of them are somewhat
ugly hand drawn placeholders.
Change-Id: I32b4e142f613003035c107f58aee7c2ecc2d017f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add in 16x16 icons for many of the widgets. These icons are used in
the Outline, as well as in the "Text + Icons" and "Icons Only" modes
in the palette.
The icons were generated by rendering previews with transparency on,
and layoutlib5, with the theme "Theme.Light" (since that sets dark
text labels etc). It also used a special version of the rendering
config file where for example the label of the TextView is "Abc" in
bold rather than "TextView", where there is no text label on radio and
check buttons, etc. Some icons were scaled proportionally, others just
cropped left or right, etc. Those who were cropped on the right have a
small amount of alpha-fadeout on the right to work better in the
outline.
Change-Id: I419d1c98068696a5bc650060750713e45462f01c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, add a new "Zoom to Fit" toolbar action. This will look at the
size of the rendered image, as well as the size of the canvas area,
and compute the largest possible scale factor that will zoom the
rendered image while showing everything.
This is particularly useful when working with larger devices, such as
WXGA, where typically the rendering comes up showing only the top left
portion of the image, and the Zoom Out function often zooms out too
much since it does not have fine granularity.
Second, add icons to the various zooming functions. The zoom in/out
icons are from Eclipse WTP; the other three are minor derivations from
these icons (using = for emulate real size, 1 for 100% and an outline
for zoom to fit).
Third hook up zoom in, zoom out, zoom to 100% and zoom to fit to
keyboard shortcuts (applicable to the canvas only).
Finally, tweak some labels.
(Also updated the ddms screencapture icon, since there was a screen
capture icon in the same Eclipse WTP icon folder)
Change-Id: Idc118a58f418daeefb5835f40dc1fd518b0f99d1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A DecorComposite wraps a control or composite such as the palette
and adds a little header with an icon, a title and an optional
toolbar of icon/actions.
The GLE palette is revamped to use this. Some actions will be
added later to toggle viewing views or layouts.
Eventually the new property panel will be one of these too.
Terminology: I tried to avoid the words "panel" or "page" or "pane"
which are just too overused. Since this is merely more than decoration
around a control, it's a DecorComposite.
I've also added a couple builder classes to make it less verbose
to set GridLayout and GridData objects. If these are useful out
of the editors, we could move them somewhere else later.
Change-Id: I5065411bfe48148c267ec6438b0ec5424123ab8c
|
|
|
|
| |
Change-Id: I34b0b2fd34a0e503c4eb9656ed36979af22ec6ce
|
|
|
|
|
|
|
|
|
|
|
| |
Example: when display the context menu for a multiple selection,
some items might be on wrap_parent whilst others might be in
match_parent. This new change has the menu display a different
icon for these choices and indicate that N out of M items are
in a given state. Basically this converts boolean support to
a tristate support.
Change-Id: Ia409a87fa17e5d36912ace6dde5f4eb094fa865f
|
|
|
|
| |
Change-Id: Iee2e75bcd127c079f80d192bc21f4e692d247447
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added proper support for qualifiers that have fake values
like "__" for language/region or "none" for dock mode. Those
are used by ADT internally but do not represent valid values, so
some UI (like the config creator) must handle them.
They didn't do it before which led to some weird UI behavior such
as a language or region qualifier with "__" value.
Added some missing icons.
Clean-up some qualifiers by moving similar code into a base class
for enum based qualifiers
Removed dependency on the current IAndroidTarget to get the
folder segment corresponding to a qualifier as it's not needed
anymore now that targets use recent versions of aapt (and will
move to using the most recent one soon).
Change-Id: I29c7bb5a7783db1696f53d0e38f46f64671e5e0d
|
|
|
|
|
|
|
| |
Getting rid of the goldish round icon with the a inside as it's not
used anywhere on android.com
Change-Id: I7ea0e4de1df973baedc41c2a1ca8918f51c25f75
|
|
|
|
| |
Change-Id: I9fc2ee167436ba234c6f09b1635f45b34b461c2e
|
|
|
|
| |
This is temporary and will be replaced once we get the standalone AVD UI.
|
| |
|