aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add support for multiple hyperlink targets"Tor Norbye2011-01-292-359/+262
|\
| * Add support for multiple hyperlink targetsTor Norbye2011-01-292-359/+262
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset makes the Go To Declaration hyperlink resolver produce a list of possible jump targets. Therefore, if you for example point at @android:string/ok, you will get a popup listing all the various string.xml files that define a translation for this string. If there is a current configuration (which would be the case if you are pointing at a resource url from a layout file, but not from a Java file or a manifest file) then the declaration which best matches the configuration is listed first, followed by everything else in alphabetical order by the folder name. This uses the resource maps which the IDE is already maintaining for rendering, so it can compute the set of hyperlinks cheaply. In addition, the hyperlink resolver now goes to the direct declaration of the given resource. This definition can in turn reference another resource url. There is one exception to the instant resolution of files: ids. In layouts it's common to define ids in place (via @+id), and these are not available in the resource map. Therefore, if no id is found defined in a value folder, then the search is deferred until the link is actually clicked. The search will now search not just the base layout folder, but all layout folders, starting with the same folder as the link source, followed by all configuration-compatible folders, followed by all folders. Change-Id: I20fd4f5836e41e5a9839124b7be3a3230f5198f4
* Merge "Add MipMap to the resource type list."Xavier Ducrohet2011-01-282-1/+2
|\
| * Add MipMap to the resource type list.Xavier Ducrohet2011-01-282-1/+2
| | | | | | | | Change-Id: I1f56ab470874e39dad8659d15a3699b83f1ac658
* | Merge "Move Pair and annoatations into resources.jar now renamed as common.jar"Xavier Ducrohet2011-01-2869-120/+134
|\ \ | |/
| * Move Pair and annoatations into resources.jar now renamed as common.jarXavier Ducrohet2011-01-2869-120/+134
| | | | | | | | | | | | | | Move all the resource query methods that returned an array of 2 Strings to return a pair of ResourceType and String. Change-Id: I6b8447aa27005de786e2defef81ad88a72363523
* | Merge "Fix compilation errors due to 2 independent changes."Tor Norbye2011-01-281-2/+2
|\ \ | |/
| * Fix compilation errors due to 2 independent changes.Xavier Ducrohet2011-01-281-2/+2
|/ | | | Change-Id: Ib7aa41aa6c95ec17ffde2644320b851f8f02f85f
* Merge "Change APIs using String instead of ResourceType."Xavier Ducrohet2011-01-2854-288/+358
|\
| * Change APIs using String instead of ResourceType.Xavier Ducrohet2011-01-2854-288/+358
| | | | | | | | | | | | | | | | | | Move ResourceType into resources.jar so that it's accessible to layoutlib.jar This is cleaner and allows us to us more efficient EnumMap objects. Change-Id: If11cbc69ae3ca8bd6c96e6d0ef402570a07af16f
* | Merge "Improve QuickContactBadge designtime"Tor Norbye2011-01-282-1/+32
|\ \ | |/ |/|
| * Improve QuickContactBadge designtimeTor Norbye2011-01-272-1/+32
| | | | | | | | | | | | | | | | Don't set the image src attribute on drop (which was done by the ImageViewRule since QuickContactBadge extends ImageView), and don't use the mail contact image in the render-config. Change-Id: I182c5e253bb754d8ae5fc54583f6a06ad3415ad0
* | Merge "Fix clean script."Raphael Moll2011-01-271-5/+11
|\ \ | |/ |/|
| * Fix clean script.Raphael Moll2011-01-271-5/+11
|/ | | | | | | | | The way bash works, the script returns the status of the last command. In this case, the last failed test's return value is what the script returns, even when that's what we want. Encapsulating the test in a function works around this. Change-Id: I44de75d80b2d16ca4110f078d40db0f71f1aa400
* Merge "Various palette improvements"Tor Norbye2011-01-276-31/+305
|\
| * Various palette improvementsTor Norbye2011-01-276-31/+305
|/ | | | | | | | | | | | | | | | | | | 1. Look up the theme background and foreground colors using theme resources, if possible. These theme resources are then used to set the foreground and background colors on the labels used as a fallback for non-previewable widgets. In other words, when you're looking at a dark theme, the layouts such as LinearLayout is now shown using a white label on a dark background, making the palette view more consistent visually. 2. Configure scrollbar increments properly such that scrolling the views with scrollwheels or mouse gestures works better. 3. Fix a bug in the way preview images were copied out of the rendered image; the root coordinates were not taken into account, which matters for themes like Theme.Dialog. Change-Id: I4832166a0560d33fe4e4dd8079c82a180e07e897
* Merge "Update the Layoutlib API to contain part of the current config."Xavier Ducrohet2011-01-2770-212/+245
|\
| * Update the Layoutlib API to contain part of the current config.Xavier Ducrohet2011-01-2770-212/+245
|/ | | | | | | | | | | | | | | | | | Right now only the screen size is needed. We can add more to Params as needed. Since we should use the existing enum classes for this, I moved all the current enum from sdklib into a new jar file called resources.jar. ADT, sdklib, layoutlib_api all depend on it. Changes to resources should always be API compatible and the result should be copied into the in-dev platform branch in prebuilt, similar to layoutlib_api. See the README.txt files in layoutlib_api/ and resources/ Change-Id: I877ba3cad555ec497954bb0866639e51e7751020
* Merge "Replace Properties.load(Reader) with Properties.load(InputStream)"Tor Norbye2011-01-271-8/+8
|\
| * Replace Properties.load(Reader) with Properties.load(InputStream)Tor Norbye2011-01-271-8/+8
| | | | | | | | Change-Id: Ic378b53448f7ae73493ec692ba77ed35c908ed86
* | Merge "Change pluging copyright date to 2011."Raphael Moll2011-01-273-3/+3
|\ \ | |/ |/|
| * Change pluging copyright date to 2011.Raphael Moll2011-01-273-3/+3
| | | | | | | | | | | | SDK bug 14206 Change-Id: I85c8ef070527ba0cc361caa28d3325f736d0b5c8
* | Merge "Add more theme query APIs to RenderResources"Xavier Ducrohet2011-01-272-6/+63
|\ \
| * | Add more theme query APIs to RenderResourcesXavier Ducrohet2011-01-262-6/+63
| | | | | | | | | | | | Change-Id: Iebde7536a0007898387dc7bb5d943e3767140a3c
* | | Merge "Properly convert the rendered layout images if alpha is needed."Xavier Ducrohet2011-01-274-6/+20
|\ \ \ | |/ / | | / | |/ |/|
| * Properly convert the rendered layout images if alpha is needed.Xavier Ducrohet2011-01-264-6/+20
| | | | | | | | | | | | | | | | | | | | The layoutlib can specify if the image is rendered as a floating window, and needs alpha. If it doesn't needed it we do a faster convert discarding the alpha which will be better when playing animations in the normal case. Change-Id: I2dbd2d1ae9190207b51978e4a8d77cdff25f3e45
* | Merge "Move keymaps to frameworks/base/data/keyboards."Jeff Brown2011-01-265-261/+0
|\ \ | |/ |/|
| * Move keymaps to frameworks/base/data/keyboards.Jeff Brown2011-01-255-261/+0
| | | | | | | | Change-Id: I787601e3ab3ac4ce3d5ef5691788af62abbf91e9
* | Merge "Palette with previews, categories and view modes"Tor Norbye2011-01-2522-393/+1972
|\ \
| * | Palette with previews, categories and view modesTor Norbye2011-01-2522-393/+1972
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Combine DescDragSourceListener and PreviewDragSourceEffect"Tor Norbye2011-01-251-101/+31
|\ \ \ | |/ / | | / | |/ |/|
| * Combine DescDragSourceListener and PreviewDragSourceEffectTor Norbye2011-01-251-101/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that a DragSource listener can also set a drag preview effect, so we don't need to have two separate classes for this; this was slightly tricky because the drag source needs to get the image from the preview drag source effect in order to record the right offsets for the drag. This changeset rolls the two classes into one, the original drag source. Change-Id: I249736c13e49f06886318ea64dc8de40e832d216
* | Merge "Add error message to log if layoutlib init fails"Tor Norbye2011-01-251-1/+5
|\ \ | |/ |/|
| * Add error message to log if layoutlib init failsTor Norbye2011-01-251-1/+5
|/ | | | Change-Id: I5f61733c02002eca9400d5abbfc33393cabd1667
* Merge "LayoutLib API update: build properties and multi ViewInfo results."Xavier Ducrohet2011-01-257-12/+40
|\
| * LayoutLib API update: build properties and multi ViewInfo results.Xavier Ducrohet2011-01-257-12/+40
|/ | | | | | | | | The build properties are needed to populate android.os.Build The multi ViewInfo results are needed to access all the top level children of a merge layout. Change-Id: I49638ae76aaf9e83dc4a0a73c3e7966d7b0a14a3
* Merge "ADT: Support class folders during build."Xavier Ducrohet2011-01-2512-41/+179
|\
| * ADT: Support class folders during build.Xavier Ducrohet2011-01-2512-41/+179
| | | | | | | | Change-Id: If1d6840082f96dd98c8be0658c6ce157b4801bd3
* | Merge "Update widget icons"Tor Norbye2011-01-2527-0/+0
|\ \
| * | Update widget iconsTor Norbye2011-01-2527-0/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Add icons for the rest of the views"Tor Norbye2011-01-2534-0/+0
|\ \
| * | Add icons for the rest of the viewsTor Norbye2011-01-2434-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Tweak TabHost drop handler"Tor Norbye2011-01-241-4/+7
|\ \ \
| * | | Tweak TabHost drop handlerTor Norbye2011-01-201-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating a single tab, create 3 tabs instead, and pick a better id since it's used as the tab label by the designtime TabSpec creator. Change-Id: I35ecb4ec8642431ff76a02d52f5194efd5909774
* | | | Merge "Add a MergeCookie class as a special-case view cookie."Xavier Ducrohet2011-01-241-0/+42
|\ \ \ \ | |_|/ / |/| | |
| * | | Add a MergeCookie class as a special-case view cookie.Xavier Ducrohet2011-01-241-0/+42
| | |/ | |/| | | | | | | Change-Id: I6e2f55cf74a683cb936e16b469e1f5abe5a0fd83
* | | Merge "Icons for various widgets"Tor Norbye2011-01-2426-0/+0
|\ \ \
| * | | Icons for various widgetsTor Norbye2011-01-2426-0/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Add palette category metadata"Tor Norbye2011-01-2414-197/+570
|\ \ \ | |_|/ |/| |
| * | Add palette category metadataTor Norbye2011-01-2014-197/+570
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset contains some background work for the palette preview work, separated out to make that changeset smaller. First, it creates a new metadata XML file, which augments the metadata provided by the platform, defining things like palette categories, a natural order for the views within each category. The older code-based metadata for fill preferences (used to decide how to set the width and height attributes on drop) are also moved into this XML file. There will be more metadata added to this file in the next changeset, where for example XML fragments defining how to render a view for preview purposes will be defined there. Second, change the signature on the view and layout descriptor lists passed around such that we don't have to do instanceof ViewElementDescriptor in various places. Fix sentence capitalization for a couple of undo label strings. Change-Id: I66191ccf4cc0f4105c2331d496f3674ac1ad8b9d