aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* LayoutLib API: New SceneStatus enum.Xavier Ducrohet2010-12-011-0/+1
| | | | Change-Id: I1c2ac6ddcabe1faeffe3753735b9f87fde683fd3
* Layoutlib API: updated API for insert/move/remove child.Xavier Ducrohet2010-12-013-23/+94
| | | | | | Also added some new SceneStatus enums. Change-Id: I225c58201d81cb1109d1d533fea48b6eacb2e286
* Merge "ADT: The image given to layoutlib now shares data with ImageData"Xavier Ducrohet2010-12-013-79/+81
|\
| * ADT: The image given to layoutlib now shares data with ImageDataXavier Ducrohet2010-11-303-79/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now create a custom BufferedImage that also includes a reusable ImageData to generate SWT images. While there is still the AWT to SWT conversion, at least most buffers aren't re-allocated every time during animation. The only new allocation is the one done in the Image constructor to pass the ImageData content to the native image object. This also fixes the tearing issue introduced in the previous commit by calling ImageOverlay.setImage from the animation listener callback. This should not be done in the UI thread runnable as each rendering reuse the same bitmap. When the animation listener callback returns, the image will be reused for a new rendering so it's content will change. Also fixes the windows rendering by computing the proper band offset based on the SWT palette Data. Change-Id: Id57a3696bd92441271f6bee9681edefd12140b02
* | Merge "ADT: fix java/class name mismatch."Raphael Moll2010-11-301-0/+0
|\ \
| * | ADT: fix java/class name mismatch.Raphael Moll2010-11-301-0/+0
| | | | | | | | | | | | Change-Id: Id0e539be1873904245f50b3bcd861f171360a990
* | | Merge "ADT: cleanup RenamePackage action."Raphael Moll2010-11-304-226/+291
|\ \ \
| * | | ADT: cleanup RenamePackage action.Raphael Moll2010-11-264-226/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move it to the refactoring package. Split action code from refactoring code. No change in functionality nor invocation (via context menu project > Android Tools.) Change-Id: Ieec945b37fdd33d497bf745d207eb5d6b5445d9f
* | | | Merge "ADT/Layoutlib: New API to let the caller instantiate the bitmap."Xavier Ducrohet2010-11-306-10/+158
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/|
| * | ADT/Layoutlib: New API to let the caller instantiate the bitmap.Xavier Ducrohet2010-11-306-10/+158
|/ / | | | | | | | | | | | | | | | | | | | | | | | | This allows us to use a bitmap more compatible with SWT. In ADT's case, because the bitmap needs to be converted to SWT before being displayed, we create a BufferedImage using a byte[] instead of a int[] so that we can simply do an array copy. Also, we reuse the generated BufferedImage unless the size changed, which lets us see less GC during animation playback. Change-Id: I0062a4f4442ff6469cf0ad4f501c1fbe8c719400
* | Merge "Move WST doc to sdk/docs."Raphael Moll2010-11-301-2/+4
|\ \
| * | Move WST doc to sdk/docs.Raphael Moll2010-11-301-2/+4
| | | | | | | | | | | | Change-Id: I53d7838b557da43a9194ddb13ec1bcd0f1119a36
* | | Merge "ADT string refactoring: replace in all files."Raphael Moll2010-11-305-101/+452
|\ \ \ | |/ /
| * | ADT string refactoring: replace in all files.Raphael Moll2010-11-305-101/+452
|/ / | | | | | | | | | | | | | | | | | | When doing an extract string either from Java or XML: - can scan/replace in all other Java files. - can scan/replace in all other XML files. - in Java, also replace in assignements. - in XML, also replace existing string name if already defined. Change-Id: Ifeef5fd444c2c18b9c071955b8e8567d6515ea95
* | Merge "Replace reflection with Sdk.makeRelativeTo"Tor Norbye2010-11-301-27/+2
|\ \
| * | Replace reflection with Sdk.makeRelativeToTor Norbye2010-11-301-27/+2
|/ / | | | | | | | | | | | | | | Replace reflection-based invocation of IPath.makeRelativeTo (which is not available in Eclipse 3.4) with usage of Sdk.makeRelativeTo, our own copy of the equivalent code. Change-Id: If67d985b96b845d85cf7fc13d47e9adeee49e8a8
* | Merge "The rendering target mode should be preserved across IDE sessions"Tor Norbye2010-11-301-3/+59
|\ \
| * | The rendering target mode should be preserved across IDE sessionsTor Norbye2010-11-301-3/+59
| | | | | | | | | | | | | | | | | | | | | | | | This changeset fixes the bug where the rendering target is not preserved across IDE sessions the way the other configuration settings seem to be. Change-Id: I56fc82b1de18c162f62e80d1ba96b54d697b2607
* | | Merge "ADT: more animation stuff."Xavier Ducrohet2010-11-293-14/+66
|\ \ \
| * | | ADT: more animation stuff.Xavier Ducrohet2010-11-293-14/+66
|/ / / | | | | | | | | | Change-Id: I020342a4fe205161328f22e9dabb0b03343677b5
* | | Merge "Rename some layout editor classes"Tor Norbye2010-11-2939-180/+187
|\ \ \ | |/ / |/| |
| * | Rename some layout editor classesTor Norbye2010-11-2939-180/+187
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset contains only renaming of some classes (and a couple of >100 column adjustments), no semantic changes. The name changes are: BaseView => BaseViewRule BaseLayout => BaseLayoutRule ScaleInfo => CanvasTransform CanvasSelection => SelectionItem PropertySheetPage2 => PropertySheetPage OutlinePage2 => OutlinePage Change-Id: I14d8c711b12154f4fcb2169129fd553e31fdab84
* | Merge "ADT: rework extract string refactoring."Raphael Moll2010-11-293-200/+494
|\ \
| * | ADT: rework extract string refactoring.Raphael Moll2010-11-293-200/+494
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the code that inserts new <string> elements in a <resources> XML, replacing my micro-XML stream-oriented parser by one based on the WST SSE region model. Also added a mini doc to explain the WST region model, since there's no doc anywhere as far as I can see. I choose to place this ad-hoc doc where I need it rather than in a generic place -- it's not a generic doc, more a reminder of the API. Change-Id: Icd39390c4124ce0ec21322ff223390ac4a06f431
* | | merge from tools_r8The Android Open Source Project2010-11-290-0/+0
|\ \ \ | | | | | | | | | | | | Change-Id: I7553de468542889488ac4dba53a23ae876ff5526
| * \ \ Merge "Win SDK: Split the win-sdk makefile and script into 2 parts. DO NOT ↵Raphael Moll2010-11-292-0/+61
| |\ \ \ | | | | | | | | | | | | | | | MERGE." into tools_r8
| | * | | Win SDK: Split the win-sdk makefile and script into 2 parts. DO NOT MERGE.Raphael Moll2010-11-292-0/+61
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Merge Change Ic94d261b from master_open into tools_r8 to fix broken SDK build.] 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: I8072bf59ee1af57826a8bafa0103afd6fe3fc858
* | | | Merge "ADT: Animation preparation."Xavier Ducrohet2010-11-297-29/+164
|\ \ \ \
| * | | | ADT: Animation preparation.Xavier Ducrohet2010-11-297-29/+164
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update layoutlib API to work better with the new scene locking mechanism (for concurrent renderings), new error types in SceneResult, and updated Animation listener. ADT changes to record the view object in CanvasViewInfo, and the current LayoutScene in ViewHierarchy. Added a test menu item to start an animation. This is temporary and will be fixed later. Change-Id: I67df2d116afdfd23c093e4645d4a0f99695c5d95
* | | | Merge "Extract layout constants into a separate constants class"Tor Norbye2010-11-2925-109/+196
|\ \ \ \
| * | | | Extract layout constants into a separate constants classTor Norbye2010-11-2825-109/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combine the constants in BaseView and a LayoutConstants class over in the internal packages into a new LayoutConstants class, and reference these constants elsewhere (statically imported). This was suggested by in the feedback to review #18971. Change-Id: I40b76f8f6045c34a98f7a2363f96d2942360d1f3
* | | | | Merge "Add unit test configuration for moreUnit"Tor Norbye2010-11-291-0/+4
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Add unit test configuration for moreUnitTor Norbye2010-11-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eclipse doesn't have a builtin mechanism to jump between a class and its test, as well as a way to run tests associated with a given class. There is however a plugin for this, "moreUnit". Our projects have split off our unit tests in a separate project, which requires some per-project configuration to tell moreUnit where to look for tests. This information has to live with the project rather than in my workspace, so I'm checking in the configuration file - it is harmless if you don't have moreUnit but useful if you do. Change-Id: Id29c46e2eaa89f2ad530c2b24700db28cc823b3b
* | | | | Merge "Fix build. Wrong import package!"Tor Norbye2010-11-281-1/+1
|\ \ \ \ \
| * | | | | Fix build. Wrong import package!Tor Norbye2010-11-281-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | Fix build. Wrong import package! Change-Id: Id96450a7f5553c88d0d5c0996ff5c378ea03bbc3
* | | | | Merge "Show images during canvas drags"Tor Norbye2010-11-2813-43/+472
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Show images during canvas dragsTor Norbye2010-11-2813-43/+472
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you drag in the canvas, show a drag image for the view being dragged. The drag image is using 30% translucency such that it does not obscure the drag feedback below it. We're grabbing the image data right out of the rendered scene and just copying out the rectangles for the bounds of each selected item. This has to take the canvas zoom into effect too. While in the zoom code I modified the Zoom In and Zoom Out buttons to only zoom by a factor of 20% rather than 100%. I cleaned up the Pair class slightly; in an earlier version of this fix I was using it to pass back two results from the rectangle painting function; I don't do that anymore but the Pair might as well be cleaned up. (By the way, as suggested in review #19035 I rewrote the FIXME comment related to resource lookup and put it in this CL rather than revising the other one.) Change-Id: Iabe6e29c4073252f5046e3c26b56f4e7674a3f3a
* | | | Merge "Unit test fixes"Tor Norbye2010-11-249-12/+17
|\ \ \ \ | |/ / / |/| | |
| * | | Unit test fixesTor Norbye2010-11-249-12/+17
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, the AddonsListFetcherTest#testLoadSample_1 was failing on the Mac, because the source code contained non-ASCII unicode characters, and the encoding differs between Windows, Linux and Mac -- and on the Mac the characters were garbage (not the intended Japanese characters). Fixed by using unicode escape sequences to define the expected output instead. Second, rename the AbstractLayoutTest to LayoutTestBase; the test runner (for plugins, not unit tests) was assuming this was a test case (even though it's an abstract class!) so it was emitting a warning about the class containing no test cases. This is simply a base class for all the individual layout tests defining a bunch of useful inherited shared behavior, so rename to avoid the warning. Change-Id: I6e29316c5644db35051218aef8b99ac41ab0cda4
* | | Merge "Replace IPath.makeRelativeTo call with reflection"Tor Norbye2010-11-231-1/+27
|\ \ \
| * | | Replace IPath.makeRelativeTo call with reflectionTor Norbye2010-11-231-1/+27
|/ / / | | | | | | | | | | | | | | | | | | | | | I broke the build because on Eclipse 3.4 there is no makeRelativeTo method on IPath. This replaces that call with reflection. This won't work on 3.4, but it's a quick fix for the broken build. Change-Id: Ia917cf5a745f76bbb96f59fae93e2a4fc4f5f900
* | | Merge "Open included layout on double click"Tor Norbye2010-11-238-11/+228
|\ \ \
| * | | Open included layout on double clickTor Norbye2010-11-238-11/+228
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | On double click, if the clicked area originates from an <include>'ed XML file, open the included layout in the editor. Also opens files in the @android: namespace if available, for example if you inculde @android:layout/select_dialog_multichoice. Change-Id: I215c411257717f7b97e7b0ee1d5498c318cdb04d
* | | Merge "Fix nine patch size."Xavier Ducrohet2010-11-233-25/+64
|\ \ \
| * | | Fix nine patch size.Xavier Ducrohet2010-11-233-25/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we moved the 9-patch chunk out of the NinePatch, the image content portion is not in our control (it's owned by the default implementation of NinePatchDrawable through an Android Bitmap), and therefore should not include the control outer line. This changeset makes the bitmap contains only the extracted content and makes the computation of the patches take into account that the draw method will be applied on a bitmap that is only the content without the control line. Basically the computation of the patches/fixed rectangle exclude the outer control line. Change-Id: I29c2224ee2311962b30d1fb155b85d5731d4e6ec
* | | | Merge "Remove some asserts."Raphael Moll2010-11-233-11/+13
|\ \ \ \ | |_|/ / |/| | |
| * | | Remove some asserts.Raphael Moll2010-11-233-11/+13
|/ / / | | | | | | | | | Change-Id: I8458dc9237506c542c766e6119261ae4e13b453b
* | | Merge "ADT: ensure <application> is last in manifest."Raphael Moll2010-11-2312-150/+293
|\ \ \
| * | | ADT: ensure <application> is last in manifest.Raphael Moll2010-11-2312-150/+293
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ADT descriptors have no notion of XML ordering. We modify the concept of "mandatory" descriptor to have normal mandatory descriptors versus "mandatory last" ones. ("mandatory" elements are virtual reserved slots that are always present in the UiModel even if they have no real counterpart in the XML model. These elements ensure they can be manipulated in the UI even before their XML is created.) Then we try our best to ensure the "last" ones remain at the end of the UiNode model. There are 2 cases: - in UiElementNode, when constructing the UINode model when parsing an existing XML model, we try to reorder the nodes at the end if possible. - in UiActions, when adding a new element to the UiModel, we try to place it before the first "mandatory last" element. SDK Bug 3197310 Change-Id: I6a7d9502a95ebe92ff82e07f3f3249a0d25c2154
* | | Merge "Refactor selection painting to fix highlighting of included views"Tor Norbye2010-11-237-196/+94
|\ \ \ | |/ / |/| |