aboutsummaryrefslogtreecommitdiffstats
path: root/layoutlib_api
Commit message (Collapse)AuthorAgeFilesLines
* Update compiler flags.Tor Norbye2012-10-261-2/+2
| | | | | | | | | | Turns off the ability to use @SuppressWarnings with optional errors is available, but off by default (see Eclipse issue 392875). This turns that off, makes missing enums in switch statements a warning, and synchronizes the settings file to all projects (except tests.) Change-Id: Iad7060523b6ee2cbbca97e0a6ffedb264b185222
* Update maven artifacts and add lint.Xavier Ducrohet2012-10-192-8/+4
| | | | | | | | | Updated the groupId of most artifacts to be more reflective of their sub-projects status in the SDK tools. Added lint artifacts. Change-Id: I900a165647a9b7d3c55b473f63c4ca4469762d7b
* Update Layoutlib_api to use a class for h/w config.Xavier Ducrohet2012-10-174-56/+135
| | | | Change-Id: Iead02d468590407ec274357f1a1c57ed8d5cc24c
* New API in layoutlib_api.Xavier Ducrohet2012-10-163-2/+15
| | | | | | | - Capability for fixed 9-patch scaling. - software button param for rendering. Change-Id: I2616dbd97dc413c2c5b5d52af6309967400d2456
* Fix javadoc here and there.Xavier Ducrohet2012-10-0213-50/+27
| | | | Change-Id: If02d0b97c294d9821a1c914547782a08b1d256fb
* Update the gradle build files.Xavier Ducrohet2012-10-021-3/+52
| | | | | | | add javadoc and source artifacts as well as POM information to upload to Maven Central. Change-Id: I51701f5a5db5b2ae41ecede115e2b36adf1fa05e
* Rename ide_common to sdk_commonSiva Velusamy2012-09-182-2/+2
| | | | Change-Id: I1b39ee439a532f3f6758be35b569948e2e906665
* Make some libraries be buildable with Gradle.Xavier Ducrohet2012-09-062-0/+31
| | | | | | They all output into out/host/repo Change-Id: I78a1a976f0a99860a66248492da7fd9c6593b1c2
* Update Guava from 10.0.1 to 13.0.1Tor Norbye2012-08-291-1/+1
| | | | Change-Id: Ia51e3e2280c3d360496550df50a540571b9b7582
* Refactor common.jarXavier Ducrohet2012-08-0723-1/+1845
| | | | | | | | | | | | | | | Move resources and com.android.util.Pair into layoutlib_api where they belong since layoutlib depends on them and we need to control the API. Made a copy of Pair to stay in common.jar but moved it to com.android.utils.Pair (the one in com.android.util.Pair is marked as deprecated to prevent usage where applicable). Also moved XmlUtil and PositionXmlParser to com.android.utils to match Pair. Change-Id: I21d7057d3f2ce604f86a3bb1fa3c130948c93b89
* Fix warningsTor Norbye2012-06-011-0/+5
| | | | | | | | | | | | | | | | | First, update our various project-specific Eclipse compiler settings configuration files to include the new Eclipse 4 flags. Second, turn off the "Unchecked conversion from non-annotated type to @NonNull" warnings; there are hundreds or thousands of these, and there isn't much we can do about them when they're coming from platform and library APIs. Third, make the lint projects warning-clean again by addressing various warnings Eclipse found (such as some unclosed resources and some null handling issues; yesterday's null annotation fixes only addressed errors, not warnings.) Change-Id: If75f7401a1cbeef1bf58b47ccaa9ad17bede7f91
* Improve search of items into style for legacy layoutlibs.Xavier Ducrohet2012-05-161-3/+7
| | | | | | | | | | | | | Legacy versions uses the old API that doesn't specify the namespace of the attribute being queried. The implementation used the namespace of the style as the namespace of the attribute but this make little sense. At better implementation searches in the project's namespace and, if the attribute is not found, then searches in the framework namespace. Change-Id: Ief43ecd45f108162de2b1512027d4eedf2c132db
* Move kxml2 to prebuilts/miscJean-Baptiste Queru2012-04-302-2/+2
| | | | Change-Id: I3a939238911ae7c09bb75b27e1ce623777cd4e18
* Properly support attr ns when used in styles.Xavier Ducrohet2012-03-164-5/+59
| | | | | | | | | | | | | Previously we just stripped the namespace prefix when reading attribute names in styles and declare-styleables. This was bad if one created a declare-styleable mixing platform and app attributes that were named the same. This change is Eclipse side only and prevents ADT crashed (due to stack overflows) but the rendering won't be correct. An updated version of layoutlib using API 8 is necessary. Change-Id: I3029f3e06cdd96cd46af511bb029bc5274b935ad
* Add @NonNull annotation and configure Eclipse settingsTor Norbye2011-12-221-1/+13
| | | | | | | | | | | | | | This changeset adds a new @NonNull annotation, to match our existing @Nullable annotation, and it adds configuration settings for Eclipse 3.8 / Eclipse 4.2 which configures the new null analysis there to use our own annotations. Note that the annotations only have source retention so there is no extra size or class-loading overhead. (To use findbugs you'll need to temporarily change retention to class-level.) In upcoming CL's I'll use these annotations to clarify the Lint API and other APIs. Change-Id: I99096d8b8a7e25ef002624d592da7700195a5872
* Update SDK codebase to JDK 6Tor Norbye2011-12-216-1/+18
| | | | | | | | | | | | | | | | | | | | | This changeset makes the SDK codebase compile with source=1.6 (which means it also requires JDK 6). This means that methods implementing an interface requires @Override's. It also means we can start using APIs like the ArrayDeque class and methods like String#isEmpty(). This changeset looks big but the change is trivial: it's basically adding @Override in all the places that need it, along with some other automatic Eclipse cleanup in certain files (such as reordering imports where they were incorrectly ordered (because older versions of Eclipse didn't always handle inner classes right)), as well as cleaning up trailing whitespace and removing some $NON-NLS-1$ markers on lines where there aren't any string literals anymore. This changeset also sets the source and target JDK level to 6 in the Eclipse compiler .settings file, and synchronizes this file to all the other Eclipse SDK projects. Change-Id: I6a9585aa44c3dee9a5c00739ab22fbdbcb9f8275
* Fix value parser to handle attr values not in declare-styleable.Xavier Ducrohet2011-06-244-37/+102
| | | | | | | Also change the layoutlib sample code to properly get the list of framework attr flag/enum values. Change-Id: Ie0bf126a0fab574d94d0f86b7b2f8581cf4eaae3
* Sample code to use the layout rendering library.Xavier Ducrohet2011-06-2321-0/+1270
| | | | | | | | | | | | | | | | | | | This is very basic sample code showing how to render a layout. This explains how to load the resources, create Folderconfig, ResourceResolver, and how to call the LayoutLibrary to do an actual render. There are some big limitations: - can't render custom views because there's nothing compiling them and generating the compiled R.class file. - not all features of ADT are present because there are things that don't make sense outside of an editor (render in context, expand empty layouts, etc...) Change-Id: I0c8676ebfbff27f0e9412bb4b13193ce64082372
* Revert ScreenLayoutSize to ScreenSize.Xavier Ducrohet2011-06-091-4/+4
| | | | | | | | | | | | I hadn't noticed that LayoutLib actually uses ScrenSize through the tools-common-prebuilt.jar, so this API is (somewhat*) frozen. * Somewhat because LayoutLib.jar actually only uses Density and ScreenSize but not the other enums (yet?) so the rename of DockMode is not a problem. Change-Id: Ida3360b0111abd96d2a27c16833b282706774fb6
* Renamed some resource enum/qualifiers to be more consistent with the platform.Xavier Ducrohet2011-06-091-4/+4
| | | | Change-Id: I9c5ea5183e115582e0b805ca3ec75aad70e4a65c
* Fix various warningsTor Norbye2011-06-091-1/+8
| | | | | | | | | | | | | I ran the latest version of findbugs on our codebase and fixed some (not all!) of the warnings. I also ran with Eclipse 3.7 RC3 and updated our compiler warning settings for the new warnings that are available. I also fixed some DOS line endings in some files (formatted with CRLF instead of LF). Change-Id: I9a9d34a9b60f2cb609245793815d96a4587007b0
* Add proper styleable support.Xavier Ducrohet2011-06-071-0/+71
| | | | Change-Id: I2dc79e71521f93d798fd4a9b33aa59979bef379d
* Add a new getParser method to IProjectCallback.Xavier Ducrohet2011-06-062-1/+11
| | | | | | | This is used to make the implementation easier with access to the XML file path in the ResourceValue. Change-Id: Iedbb194bdf4b3d17841be1d50c384b62615bae8f
* Add support for the TV dpi.Xavier Ducrohet2011-06-031-0/+1
| | | | Change-Id: I97fedc69644d83801b50d7882bb759db7089d8f0
* Detect and add special warning for wrong themesTor Norbye2011-05-231-0/+7
| | | | | | | | | | | | | | | | | | | If you open a layout designed for a particular theme in another theme, you can get many confusing error messages. Instead of "attribute missing" it may tell you that it failed to convert a resource to a color or drawable, and so on. To help guide users to the root problem (wrong theme chosen) this changeset detects the scenario where theme attributes can't be resolved, and when these are found the top of the error log will start with a bold message stating that theme resources were not found and to check whether the correct theme is chosen. To do this, the resource resolver emits a new sub-type of the resource missing tag into the error log, which is used in the IDE to prefix the errors with the special error message. Change-Id: Ic29c9af37da4b5cc2c9fb1ca5670c8b8f79bf852
* Add revision number to the layoutlib.Xavier Ducrohet2011-05-181-0/+8
| | | | Change-Id: I9a990c41c46ce9901a241b18aee00d1fc4c84383
* Update layoutlib api level to 6.Xavier Ducrohet2011-05-161-1/+1
| | | | | | This will make earlier ADT versions force the user to update. Change-Id: I5331da72306453647f8d48ddb3b5d4cd4e662550
* Add baseline/margins to ViewInfo.Xavier Ducrohet2011-05-165-4/+70
| | | | | | | Also make it so that older layoutlib that are using API5 return the value through reflection (done in LayoutLibrary.) Change-Id: I3a32666e525f0f1d37a13e670d1d1c659b8e2027
* Move getParser(name) into IProjectCallback.Xavier Ducrohet2011-04-202-1/+9
| | | | Change-Id: I316f03a9903e90eac0cb8059469c1de5b679dac5
* Add Baseline utility method to layoutlib's bridge.Xavier Ducrohet2011-04-141-0/+13
| | | | Change-Id: I580dad3b15de028b299a0c75e206bb31b5d6d062
* Minor layoutlib api change for the data binding project callback.Xavier Ducrohet2011-04-061-8/+9
| | | | Change-Id: Ib1b39938a459627a6ecf70556bdd6a99342ddf93
* Move getViewParent/Index from RenderSession to Bridge.Xavier Ducrohet2011-04-063-27/+38
| | | | | | Also update the IProjectCallback to handle expandableListView. Change-Id: I36ca8733182bbd9d169fee3e709ebc532fef7b1e
* New LayoutLib API to handle data binding in ExpandableListView.Xavier Ducrohet2011-04-053-30/+107
| | | | Change-Id: Ic59acce7485887b4efde76697a85848e6bf91a97
* LayoutLib API: update adapter binding callbacks.Xavier Ducrohet2011-04-041-5/+30
| | | | Change-Id: I85be09fd7541da366c858ea04d7c2c4b53948475
* Add toString to ResourceReferenceXavier Ducrohet2011-04-041-0/+8
| | | | Change-Id: I9ea9625a839a4dc2c9d03baa5b0d56ddc7f198ee
* Merge "Add a way to get the adapter binding through the project callback."Xavier Ducrohet2011-04-013-82/+111
|\
| * Add a way to get the adapter binding through the project callback.Xavier Ducrohet2011-04-013-82/+111
| | | | | | | | Change-Id: I0de48e3519f38a63c3462f5eb0c7f6c2a29d0e6f
* | Improve view cookie handlingTor Norbye2011-04-011-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | The layout editor is passed a ViewInfo hierarchy by the layout library. For older versions of the layout library, it can be handed hierarchies where the view cookies (which point back to XML model objects corresponding to the rendered views) that are missing or ambiguous. For that reason, it has various algorithms to try to piece things back together, and for example handle <merge> scenarios as best it can. This isn't necessary with layout lib version 5 and higher, since as of version 5 these scenarios are handled on the layout lib side and the layout editor is passed back special cookies like the MergeCookie to properly handle the various scenarios. This fix makes the layout editor look up the layoutlib version, and if dealing with version 5 or higher, it takes a simpler path to build up the hierarchy. This is also necessary to deal with the latest version of layoutlib which passes a new type of view cookie which the older algorithm couldn't handle. Change-Id: I98c3ba5d17ad9d639eb118e4709c0b6bbf815b0a
* Add repeat count config to layoutlib_api's AdapterBinding.Xavier Ducrohet2011-03-291-0/+9
| | | | Change-Id: Idbb54de6dee6d6b466476a0e3acdd87dd394ee42
* Add support for data binding in the layout editor.Xavier Ducrohet2011-03-297-38/+292
| | | | | | | The Layoutlib_api is changed to allow passing information regarding adapter content, and querying eclipse to fill the items. Change-Id: Ie5a047ab9cd0ed7677c13309d95663eae462c3e7
* Merge "Add missing notice files."Xavier Ducrohet2011-03-171-0/+190
|\
| * Add missing notice files.Xavier Ducrohet2011-03-151-0/+190
| | | | | | | | | | | | | | | | | | | | Also fix some makefiles to make sure the notices are picked up. - move the makefile outside of the source folder. - resources are now in the source folder directly instead of being inside src/resources. It's much simpler. Change-Id: Ica8ee4c2bc8a9b035d23fc914d4137cdca7e567d
* | Disable the "unecessary else" warning.Raphael Moll2011-03-171-1/+1
|/ | | | | | | | This can be a matter of personal taste, but I find it a lot more readable to write an if {} else {} sometimes, and it's perfectly valid, so really it shouldn't be marked as a warning. Change-Id: Iac1b9bd5f9602b5018f7432422e0a083f4836490
* Add specifc warnings config for most sdk eclipse projects.Xavier Ducrohet2011-03-141-0/+64
| | | | Change-Id: I9837714c5673d43fa7108b16ab264f1017c4bd3d
* Make inline ResourceItem able to generate ResourceValueXavier Ducrohet2011-03-101-7/+8
| | | | | | | | | | | | | | | This change fix the issue that since the simplification of the resource repository, the resource item for inline ID values would not be called to generate a ResourceValue since their list of source file was empty. This moves the creation of the ResourceValue to the ResourceItem so that InlineResourceItem can override it. This required moving findMatchingConfigurable into FolderConfiguration which is a much better place for it anyway. Change-Id: I36d6b148528c593ea432c9fd0ac8d542cbe2a26e
* Add to layoutlib_api the ability to do layout only.Xavier Ducrohet2011-02-172-59/+66
| | | | | | | | | | This lets the session do the measure/layout part and skip the draw. This returns the object location through the ViewInfo but not the rendering. Change-Id: I8875b4631b5fb00efa7096d804129612d46d9dc9
* Minor layoutlib API fix: rename a CapabilityXavier Ducrohet2011-02-071-1/+1
| | | | | | TRANSPARENT -> CUSTOM_BACKGROUND_COLOR Change-Id: Iaa521231983de4d1008a7bb86b923f295d295a65
* Add to layoutlib the ability to simply render a Drawable.Xavier Ducrohet2011-02-045-45/+216
| | | | | | | | | | | RenderParams is now a base class. SessionParams extends it (and contains the layout and the rendering mode which are not part of the base class). DrawableParams is used for the new action and adds a reference to a ResourceValue. Change-Id: Ieacf4da91fda95df1d25a32ae0953bd9d8028113
* Add app name/icon and current render locale to the LayoutLib API.Xavier Ducrohet2011-02-046-11/+67
| | | | | | | | | | | | This allows the layoutlib to render system/title/action bars as a window decor like it would look on the device. This can be disabled with RenderParams.setForceNoDecor(). (BTW, Params was renamed RenderParams too) Also minor update to the API by replacing an int with Density since the enum is now accessible to the API and layoutlib. Change-Id: Ic37770a9276d12af90c60199a84b04cb64e7c3a1
* Move Pair and annoatations into resources.jar now renamed as common.jarXavier Ducrohet2011-01-283-8/+8
| | | | | | | Move all the resource query methods that returned an array of 2 Strings to return a pair of ResourceType and String. Change-Id: I6b8447aa27005de786e2defef81ad88a72363523