aboutsummaryrefslogtreecommitdiffstats
path: root/ide_common
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Move classes to ide-common"Xavier Ducrohet2011-03-1832-0/+4718
|\
| * Move classes to ide-commonXavier Ducrohet2011-03-1732-0/+4718
| | | | | | | | | | | | | | | | | | ResourceFolder/File and children classes (single/multi file) ResourceItem and children classes ResourceRepository (base and framework, project stays in ADT for now) All the ResourceQualifiers and FolderConfiguration Change-Id: I5adc9bdc4886a8fa0ab44860763d594cf7af4bd5
* | 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
* Resource management refactoring and clean-up.Xavier Ducrohet2011-03-081-47/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - (I)ResourceRepository is now a common class instead of an interface. This contains most of the code to control a repository (which was extracted from ProjectResources) ProjectResources extends it adding minor features such as library support, and inline ID definition. FrameworkResources extends it adding support for public resources (which used to be duplicated and dispersed in weird places). Changed the way resources are reloaded on resource change event. Instead of marking the resources as modified (using Resource.touch()), the resources are now parsed as the files are processed during the resource delta visitor. This makes more sense as there are now other listeners to the resource changes (hyperlinks) that access the resource list in their listeners, which wouldn't work previously. This also makes the code cleaner as the previous method had to query the repo for items and return a list of new ones, which was kinda crappy. The new code is much simpler, as is the post update process. - ResourceItem is now the base class for resource items. It includes all the small methods that were added by all the child classes or interfaces. Project/ConfigurableResourceItem are merged into the based class. IIdResourceItem and IdResourceItem are gone and replaced by a simpler InlineResourceItem. FrameworkResourceItem is a simple override for framework resources. - Also improved the API of a bit for the resource repository, making more use of unmodifiable lists and emptyList/Map() Change-Id: Ie3ac1995213fed66153c7e7ecbdd170ec257be62
* Remove some non needed asserts.Xavier Ducrohet2011-02-221-1/+0
| | | | Change-Id: Ib12b25d7c7a6630075cfe4f5e757a10673305220
* Fix possible NPE in legacy callback support.Xavier Ducrohet2011-02-061-1/+5
| | | | Change-Id: I5faa155393466e1bc4b2fc1e9417cde91a8be456
* Add to layoutlib the ability to simply render a Drawable.Xavier Ducrohet2011-02-041-7/+23
| | | | | | | | | | | 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-041-8/+8
| | | | | | | | | | | | 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
* Add MipMap to the resource type list.Xavier Ducrohet2011-01-281-1/+1
| | | | Change-Id: I1f56ab470874e39dad8659d15a3699b83f1ac658
* Move Pair and annoatations into resources.jar now renamed as common.jarXavier Ducrohet2011-01-284-6/+27
| | | | | | | 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-44/+70
| | | | | | | | | 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
* Add more theme query APIs to RenderResourcesXavier Ducrohet2011-01-261-1/+36
| | | | Change-Id: Iebde7536a0007898387dc7bb5d943e3767140a3c
* LayoutLib API update: build properties and multi ViewInfo results.Xavier Ducrohet2011-01-252-5/+10
| | | | | | | | | 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
* Move the resource resolution code into ide-common.Xavier Ducrohet2011-01-172-7/+518
| | | | | | | | | | | 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
* Move ValueResourceParser into a better package.Xavier Ducrohet2011-01-161-1/+1
| | | | Change-Id: I15ae7efd2d482bd5bc368983a1745d9026f964b2
* Fix build by updating ide-common to the new LayoutLog.Xavier Ducrohet2011-01-141-3/+3
| | | | Change-Id: If1a01daa87561f474b4c43d6c404a3c42e98d485
* Resource parser should strip unescaped " from string values.Xavier Ducrohet2011-01-121-0/+8
| | | | Change-Id: I15cc5becdf139a7eeb01309d0d903a35ba773ed9
* Remove error(tag, throwable) from LayoutLog.Xavier Ducrohet2011-01-111-1/+1
| | | | | | | | | | | | 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
* Fix NPE in layout lib legacy conversion for empty layouts.Xavier Ducrohet2011-01-041-3/+5
| | | | Change-Id: I23a87efb586d02d571118a6f9e49628fc850d8cb
* Add log to layout lib init method.Xavier Ducrohet2011-01-031-2/+4
| | | | Change-Id: I28efe429925a77fd10b76bb54519ae9d42900e52
* LayoutLib API refactoringXavier Ducrohet2010-12-217-63/+152
| | | | Change-Id: I40abba4c4f786755c2a1c0e70df4d7bc08e2bcde
* Clean up the api around Layoutlib.Xavier Ducrohet2010-12-106-418/+362
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix the build by putting a missing LOCAL_MODULE_TAGSXavier Ducrohet2010-12-091-0/+2
| | | | Change-Id: Ie5cdd59663ef469204f693c888231a2476d954f4
* LayoutLib API: new log API + updated SceneStatus API.Xavier Ducrohet2010-12-061-6/+25
| | | | Change-Id: I8fe107397c2322cca979e7953d2be5933a59d0bf
* LayoutLib API: SceneResult API clean up.Xavier Ducrohet2010-12-031-1/+1
| | | | Change-Id: I1cb80da55f9ff16d0422eb6c4767448a4691b74b
* LayoutLib API: move add/moveChild API back to using index.Xavier Ducrohet2010-12-021-2/+3
| | | | | | Also add an optional data bundle to SceneResult. Change-Id: I9f9d4ca1f1f05d536a87a005a7939a6d42d0d8a4
* ADT/Layoutlib: update API to control how layout expands.Xavier Ducrohet2010-11-191-1/+3
| | | | | | | | | | | | | | 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
* Rename layoutlib_utils into ide_common.Xavier Ducrohet2010-11-1113-0/+926
Change-Id: Id243fe66e2ce577bc821ca454bca18444ebb5e7d