aboutsummaryrefslogtreecommitdiffstats
path: root/layoutlib_api
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Change APIs using String instead of ResourceType.Xavier Ducrohet2011-01-285-24/+25
| | | | | | | | | 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
* Update the Layoutlib API to contain part of the current config.Xavier Ducrohet2011-01-278-71/+40
| | | | | | | | | | | | | | | | | | 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
* Add more theme query APIs to RenderResourcesXavier Ducrohet2011-01-261-5/+27
| | | | Change-Id: Iebde7536a0007898387dc7bb5d943e3767140a3c
* Properly convert the rendered layout images if alpha is needed.Xavier Ducrohet2011-01-261-0/+10
| | | | | | | | | | 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
* LayoutLib API update: build properties and multi ViewInfo results.Xavier Ducrohet2011-01-252-5/+13
| | | | | | | | | 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
* Add a MergeCookie class as a special-case view cookie.Xavier Ducrohet2011-01-241-0/+42
| | | | Change-Id: I6e2f55cf74a683cb936e16b469e1f5abe5a0fd83
* Add min/targetSdkVersion to the LayoutLib API.Xavier Ducrohet2011-01-171-1/+19
| | | | | | | | This will allow some widgets to properly behave based on the minSdkVersion and targetSdkVersion of the project during rendering. Change-Id: I96d432b8b92fbc211ce122da51bd18049708c14f
* Move the resource resolution code into ide-common.Xavier Ducrohet2011-01-172-40/+183
| | | | | | | | | | | Also move the LayoutLib API to use a new class for all resource info instead of 2 maps, one string, and a boolean. The goal is to move resource resolution code into ADT so that we can use it to better display resource information in the UI. Change-Id: Iad1c1719ab0b08d1a7d0987b92d4be1d3a895adf
* Add optional data to LayoutLog API.Xavier Ducrohet2011-01-141-10/+110
| | | | Change-Id: Iaa82c3647996a9ce7d7d348cdc19dce34b941238
* Add prefix constants for LayoutLog tags.Xavier Ducrohet2011-01-131-5/+7
| | | | | | | Some tags have "categories", for instance "resources.resolve" I created a new constant that contains "resources." Change-Id: Ifda535b3378021a275e73d988bcf5707e9ab39ff
* Add Layoutlib log tag constants to LayoutLogXavier Ducrohet2011-01-131-0/+16
| | | | Change-Id: Idf50886132913728c40c23026c1b55172015904b
* New layoutlib API: getViewParent and getViewIndexXavier Ducrohet2011-01-121-0/+23
| | | | Change-Id: I201e42a9a7e31fcef8b7a0c5b91a6abd5d5407bd
* Remove error(tag, throwable) from LayoutLog.Xavier Ducrohet2011-01-111-6/+3
| | | | | | | | | | | | We should never only log an exception with no associated message. Also, I've found several case in the layoutlib where there is a message in place of the tag. This new API makes it more clear that there's both a tag and a message since both are required for error() Change-Id: I6d5f45c07b1cb8df96311d930170526bb729fae6
* More fine grained layoutlib Capability for animation support.Xavier Ducrohet2011-01-091-5/+19
| | | | | | | | Make the distinction between playing animation, animating view insert/delete/move inside the same viewgroup and animating move across layouts. Change-Id: Ia9a6e4e53425a66a74ddd39796b04ed8c78d4a5a
* Add log to layout lib init method.Xavier Ducrohet2011-01-031-2/+5
| | | | Change-Id: I28efe429925a77fd10b76bb54519ae9d42900e52
* LayoutLib API refactoringXavier Ducrohet2010-12-2123-149/+328
| | | | Change-Id: I40abba4c4f786755c2a1c0e70df4d7bc08e2bcde
* Fix javadoc for layout lib api.Xavier Ducrohet2010-12-157-24/+19
| | | | Change-Id: I42b835ef2dc34af069567555ce9a4e4ecfcd6639
* Clean up the api around Layoutlib.Xavier Ducrohet2010-12-1010-17/+305
| | | | | | | | | | | | | | | | | | | | | | | | Move (Style/DensityBased)ResourceValue into layoutlib_api and make the API use that instead of the interface. We'll get ride of the interfaces once only obsolete platforms use them. In ide-commons also got rid of LayoutBridgeWrapper and moved the code in LayoutLibrary which does not expose the bridge anymore, and instead expose an API similar to the LayoutBridge class. Updated ADT to use LayoutLibrary directly instead of going through LayoutLibrary.getBridge(). This allows us to hide some things like querying the API level and relying instead on Capabilities (with special handle for legacy bridges). Also added an error message to LayoutLibrary to display why it may have failed to load. Added a check to the API level and don't load layoutlib that are more recent than the client. Change-Id: Ie4e615d8d32485ee577bb88e95cd3f562bf590cb
* LayoutLib API: new log API + updated SceneStatus API.Xavier Ducrohet2010-12-065-29/+69
| | | | Change-Id: I8fe107397c2322cca979e7953d2be5933a59d0bf
* LayoutLib API: SceneResult API clean up.Xavier Ducrohet2010-12-031-23/+74
| | | | Change-Id: I1cb80da55f9ff16d0422eb6c4767448a4691b74b
* LayoutLib API: add capability query.Xavier Ducrohet2010-12-023-5/+62
| | | | | | | Also add a map of new layout params attribute when moving views from one parent to another. Change-Id: If12d861d29f1bb0ec59c15d85439630ebdad4b82
* LayoutLib API: fixed wrong camelcase in API.Xavier Ducrohet2010-12-021-1/+1
| | | | Change-Id: Iddc8681b841d445747f583380c136310d64c41fc
* LayoutLib API: move add/moveChild API back to using index.Xavier Ducrohet2010-12-022-50/+49
| | | | | | Also add an optional data bundle to SceneResult. Change-Id: I9f9d4ca1f1f05d536a87a005a7939a6d42d0d8a4
* 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-012-20/+92
| | | | | | Also added some new SceneStatus enums. Change-Id: I225c58201d81cb1109d1d533fea48b6eacb2e286
* ADT/Layoutlib: New API to let the caller instantiate the bitmap.Xavier Ducrohet2010-11-302-0/+52
| | | | | | | | | | | | | 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
* ADT: more animation stuff.Xavier Ducrohet2010-11-291-5/+19
| | | | Change-Id: I020342a4fe205161328f22e9dabb0b03343677b5
* ADT: Animation preparation.Xavier Ducrohet2010-11-293-25/+95
| | | | | | | | | | | | | | 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
* ADT/Layoutlib: update API to control how layout expands.Xavier Ducrohet2010-11-191-8/+30
| | | | | | | | | | | | | | Previous API was a single on/off to let the layouts expand at render time depending on how much space they needed. The new API can now control expansion is horizontal and/or vertical (or not at all) Basic implementation in the editor, with a manual detect of "ScrollView" as top element. We should make the ViewRule handle this somehow. Change-Id: Idc503bc0d1d3df98fbf01cc84625952ca55a8afb
* ADT/GLE: Platform selection when rendering layouts.Xavier Ducrohet2010-11-161-3/+3
| | | | Change-Id: Iabbd49cdd52419b947b83fb84f9fb3a5d4576471